[Tizen] Fix build error for Clang-16+ (#399) accepted/tizen/unified/20240215.175757 accepted/tizen/unified/dev/20240620.010646
author이형주/MDE Lab(SR)/삼성전자 <leee.lee@samsung.com>
Thu, 15 Feb 2024 10:34:24 +0000 (19:34 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Thu, 15 Feb 2024 10:34:24 +0000 (19:34 +0900)
commit6addc35b71608cf997b6aa036122a0794a715a5c
treeb94b50d0fdf307c56b865558ea370acf2f569278
parent995f079cddebd9d31a3f9cf1a91b50edb976a5ba
[Tizen] Fix build error for Clang-16+ (#399)

This commit is a mix of upstream commits specific to tizen unified.

* [release/7.0] Suppress clang-16 warnings (backport #81573) (#84444)

Fix DBI loading problem on Linux (#82461)

* Use logical and for boolean operation in bstr (#67858)

This seems like a mistake and recent versions of clang even complain
about it:

    /runtime/src/coreclr/palrt/bstr.cpp:50:13: error: use of bitwise '&' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
            if (SUCCEEDED(ULongMult(cchSize, sizeof(WCHAR), &temp)) &
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                    &&
    /runtime/src/coreclr/pal/inc/pal.h:5144:27: note: expanded from macro 'SUCCEEDED'
    #define SUCCEEDED(Status) ((HRESULT)(Status) >= 0)
                              ^
    /runtime/src/coreclr/palrt/bstr.cpp:50:13: note: cast one or both operands to int to silence this warning
    /runtime/src/coreclr/pal/inc/pal.h:5144:27: note: expanded from macro 'SUCCEEDED'
    #define SUCCEEDED(Status) ((HRESULT)(Status) >= 0)
                              ^
    1 error generated.

* Fix Wunqualified-std-cast-call in singlefilehost (#72305)

Modified by hand due to mingling w/ other commits

---------

Co-authored-by: Antoine Martin <dev@ayakael.net>
Co-authored-by: Omair Majid <omajid@redhat.com>
eng/native/configurecompiler.cmake
src/coreclr/dlls/mscordbi/CMakeLists.txt
src/coreclr/palrt/bstr.cpp
src/libraries/Native/Unix/CMakeLists.txt
src/native/corehost/apphost/static/CMakeLists.txt
src/native/corehost/apphost/static/singlefilehost_freebsdexports.src [moved from src/native/corehost/apphost/static/singlefilehost_OSXexports.src with 81% similarity]
src/native/corehost/apphost/static/singlefilehost_unixexports.src
src/native/corehost/fxr/sdk_resolver.cpp