summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-03-10 21:48:02 +0100
committerMichał Górny <mgorny@gentoo.org>2018-03-10 21:48:34 +0100
commitdeda94ea9dfc8e43ece0a6bd7190ba67147ec08e (patch)
tree90bb61b615596e68f6031300ae29ceaee17b6892 /sys-devel/llvm/llvm-6.0.9999.ebuild
parentsys-devel/gdb: bump the patchset up to 1, bug #650130 (diff)
downloadgentoo-deda94ea9dfc8e43ece0a6bd7190ba67147ec08e.tar.gz
gentoo-deda94ea9dfc8e43ece0a6bd7190ba67147ec08e.tar.bz2
gentoo-deda94ea9dfc8e43ece0a6bd7190ba67147ec08e.zip
sys-devel/llvm: Apply -mno-bmi to work-around gcc-7 bug
Thanks to Alexander Bezrukov for finding the upstream bug and suggesting a proper workaround. Closes: https://bugs.gentoo.org/649880
Diffstat (limited to 'sys-devel/llvm/llvm-6.0.9999.ebuild')
-rw-r--r--sys-devel/llvm/llvm-6.0.9999.ebuild7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys-devel/llvm/llvm-6.0.9999.ebuild b/sys-devel/llvm/llvm-6.0.9999.ebuild
index 38353f69eef9..631422bd1ad4 100644
--- a/sys-devel/llvm/llvm-6.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-6.0.9999.ebuild
@@ -170,6 +170,13 @@ multilib_src_configure() {
)
fi
+ # 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
+ local CFLAGS="${CFLAGS} -mno-bmi"
+ local CXXFLAGS="${CXXFLAGS} -mno-bmi"
+ fi
+
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
cmake-utils_src_configure