commit:     ea7b6929b52c6571eadd5d6fd6fb3f8e266a3e1e
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 23 09:20:54 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Mar 23 09:35:54 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea7b6929

sys-devel/llvm: Apply -fno-bmi only on x86 arches

Closes: https://bugs.gentoo.org/650506

 sys-devel/llvm/llvm-6.0.0.ebuild    | 5 ++++-
 sys-devel/llvm/llvm-6.0.9999.ebuild | 5 ++++-
 sys-devel/llvm/llvm-9999.ebuild     | 5 ++++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/sys-devel/llvm/llvm-6.0.0.ebuild b/sys-devel/llvm/llvm-6.0.0.ebuild
index 506dba50c90..9e9f2c10509 100644
--- a/sys-devel/llvm/llvm-6.0.0.ebuild
+++ b/sys-devel/llvm/llvm-6.0.0.ebuild
@@ -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

diff --git a/sys-devel/llvm/llvm-6.0.9999.ebuild 
b/sys-devel/llvm/llvm-6.0.9999.ebuild
index 157cf1fbd33..6276ab4925a 100644
--- a/sys-devel/llvm/llvm-6.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-6.0.9999.ebuild
@@ -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

diff --git a/sys-devel/llvm/llvm-9999.ebuild b/sys-devel/llvm/llvm-9999.ebuild
index 7699f3364d0..414c82e01aa 100644
--- a/sys-devel/llvm/llvm-9999.ebuild
+++ b/sys-devel/llvm/llvm-9999.ebuild
@@ -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

Reply via email to