sys-libs/compiler-rt-sanitizers: Use strip-unsupported-flags
authorMichał Górny <mgorny@gentoo.org>
Thu, 16 Feb 2017 14:11:43 +0000 (15:11 +0100)
committerMichał Górny <mgorny@gentoo.org>
Thu, 16 Feb 2017 14:16:23 +0000 (15:16 +0100)
Use strip-unsupported-flags to strip flags not supported by clang
instead of a hardcoded known-bad flag list.

sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-4.0.0_rc2.ebuild
sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild

index 679d166d733f29b3b46fed1f37f2c4be5a6a7d86..2c004b0a3a2acfdbbd515512bfdfb5c11a765346 100644 (file)
@@ -74,7 +74,9 @@ src_configure() {
 
                # same flags are passed for build & tests, so we need to strip
                # them down to a subset supported by clang
-               filter-flags -msahf -frecord-gcc-switches
+               CC=${EPREFIX}/usr/lib/llvm/${LLVM_SLOT}/bin/clang \
+               CXX=${EPREFIX}/usr/lib/llvm/${LLVM_SLOT}/bin/clang++ \
+               strip-unsupported-flags
        fi
 
        cmake-utils_src_configure
index 6e4198615177810042860cbccdbffaf4d5b63bae..4d66c86e90b6ea1c4cb6836e7ffeee6b28bd6da0 100644 (file)
@@ -80,7 +80,9 @@ src_configure() {
 
                # same flags are passed for build & tests, so we need to strip
                # them down to a subset supported by clang
-               filter-flags -msahf -frecord-gcc-switches
+               CC=${EPREFIX}/usr/lib/llvm/${LLVM_SLOT}/bin/clang \
+               CXX=${EPREFIX}/usr/lib/llvm/${LLVM_SLOT}/bin/clang++ \
+               strip-unsupported-flags
        fi
 
        cmake-utils_src_configure