sys-devel/llvm: Apply -fno-bmi only on x86 arches
authorMichał Górny <mgorny@gentoo.org>
Fri, 23 Mar 2018 09:20:54 +0000 (10:20 +0100)
committerMichał Górny <mgorny@gentoo.org>
Fri, 23 Mar 2018 09:35:54 +0000 (10:35 +0100)
Closes: https://bugs.gentoo.org/650506

sys-devel/llvm/llvm-6.0.0.ebuild
sys-devel/llvm/llvm-6.0.9999.ebuild
sys-devel/llvm/llvm-9999.ebuild

index 506dba50c90e0a48572124f7722b6004d5be88d5..9e9f2c1050902a90aba9716fbefebc58004d7267 100644 (file)
@@ -172,7 +172,10 @@ multilib_src_configure() {
 
        # workaround BMI bug in gcc-7 (fixed in 7.4)
        # https://bugs.gentoo.org/649880
-       if tc-is-gcc && [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]]; then
+       # apply only to x86, https://bugs.gentoo.org/650506
+       if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] &&
+                       [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]]
+       then
                local CFLAGS="${CFLAGS} -mno-bmi"
                local CXXFLAGS="${CXXFLAGS} -mno-bmi"
        fi
index 157cf1fbd33ca9fb0c88e3cae0183aaf08e5ba4b..6276ab4925ae0c82dd0beba303c5bf356a25527a 100644 (file)
@@ -172,7 +172,10 @@ multilib_src_configure() {
 
        # workaround BMI bug in gcc-7 (fixed in 7.4)
        # https://bugs.gentoo.org/649880
-       if tc-is-gcc && [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]]; then
+       # apply only to x86, https://bugs.gentoo.org/650506
+       if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] &&
+                       [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]]
+       then
                local CFLAGS="${CFLAGS} -mno-bmi"
                local CXXFLAGS="${CXXFLAGS} -mno-bmi"
        fi
index 7699f3364d0cec1991d319e79a147a3920f524f4..414c82e01aa5a3cc40a540571a4770de360cafbd 100644 (file)
@@ -174,7 +174,10 @@ multilib_src_configure() {
 
        # workaround BMI bug in gcc-7 (fixed in 7.4)
        # https://bugs.gentoo.org/649880
-       if tc-is-gcc && [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]]; then
+       # apply only to x86, https://bugs.gentoo.org/650506
+       if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] &&
+                       [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]]
+       then
                local CFLAGS="${CFLAGS} -mno-bmi"
                local CXXFLAGS="${CXXFLAGS} -mno-bmi"
        fi