From deda94ea9dfc8e43ece0a6bd7190ba67147ec08e Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sat, 10 Mar 2018 21:48:02 +0100 Subject: 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 --- sys-devel/llvm/llvm-6.0.9999.ebuild | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sys-devel/llvm/llvm-6.0.9999.ebuild') 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 -- cgit v1.2.3-65-gdbad