diff options
author | 2024-07-20 16:23:32 +0000 | |
---|---|---|
committer | 2024-09-09 19:15:11 +0100 | |
commit | 31a45f02c1df2f828972c42210b298786bf122e6 (patch) | |
tree | af52b514eb7d1ca3589481fe65c7f612930d2802 /dev-libs/rocm-device-libs/rocm-device-libs-6.1.1.ebuild | |
parent | rocm.eclass: add rocm_use_hipcc function and update example accordingly (diff) | |
download | gentoo-31a45f02c1df2f828972c42210b298786bf122e6.tar.gz gentoo-31a45f02c1df2f828972c42210b298786bf122e6.tar.bz2 gentoo-31a45f02c1df2f828972c42210b298786bf122e6.zip |
dev-libs/rocm-device-libs: strip unsupported flags for potentially switched compiler
Closes: https://bugs.gentoo.org/936099
Closes: https://bugs.gentoo.org/937276
Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/rocm-device-libs/rocm-device-libs-6.1.1.ebuild')
-rw-r--r-- | dev-libs/rocm-device-libs/rocm-device-libs-6.1.1.ebuild | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/dev-libs/rocm-device-libs/rocm-device-libs-6.1.1.ebuild b/dev-libs/rocm-device-libs/rocm-device-libs-6.1.1.ebuild index 04fd989b95cb..bd28fb96d253 100644 --- a/dev-libs/rocm-device-libs/rocm-device-libs-6.1.1.ebuild +++ b/dev-libs/rocm-device-libs/rocm-device-libs-6.1.1.ebuild @@ -4,7 +4,7 @@ EAPI=8 LLVM_COMPAT=( 18 ) -inherit cmake llvm-r1 +inherit cmake flag-o-matic llvm-r1 MY_P=llvm-project-rocm-${PV} components=( "amd/device-libs" ) @@ -66,12 +66,17 @@ src_prepare() { } src_configure() { + # Do not trust CMake with autoselecting Clang, as it autoselects the latest one + # producing too modern LLVM bitcode and causing linker errors in other packages. + # Clean up unsupported flags for the switched compiler, see #936099 + local -x CC="$(get_llvm_prefix)/bin/clang" + local -x CXX="$(get_llvm_prefix)/bin/clang++" + strip-unsupported-flags + local mycmakeargs=( -DLLVM_DIR="$(get_llvm_prefix)" ) - # do not trust CMake with autoselecting Clang, as it autoselects the latest one - # producing too modern LLVM bitcode and causing linker errors in other packages - CC="$(get_llvm_prefix)/bin/clang" CXX="$(get_llvm_prefix)/bin/clang++" cmake_src_configure + cmake_src_configure } src_install() { |