summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSv. Lockal <lockalsash@gmail.com>2024-07-20 16:23:32 +0000
committerSam James <sam@gentoo.org>2024-09-09 19:15:11 +0100
commit31a45f02c1df2f828972c42210b298786bf122e6 (patch)
treeaf52b514eb7d1ca3589481fe65c7f612930d2802 /dev-libs/rocm-device-libs
parentrocm.eclass: add rocm_use_hipcc function and update example accordingly (diff)
downloadgentoo-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')
-rw-r--r--dev-libs/rocm-device-libs/rocm-device-libs-6.1.1.ebuild13
-rw-r--r--dev-libs/rocm-device-libs/rocm-device-libs-6.1.2.ebuild13
2 files changed, 18 insertions, 8 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() {
diff --git a/dev-libs/rocm-device-libs/rocm-device-libs-6.1.2.ebuild b/dev-libs/rocm-device-libs/rocm-device-libs-6.1.2.ebuild
index a6d5dd67438b..a19a93f076ef 100644
--- a/dev-libs/rocm-device-libs/rocm-device-libs-6.1.2.ebuild
+++ b/dev-libs/rocm-device-libs/rocm-device-libs-6.1.2.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" )
@@ -67,12 +67,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() {