commit: c920eb1e343b78b6ddf21915654103e12c4c83dc Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> AuthorDate: Tue Oct 27 18:32:38 2015 +0000 Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> CommitDate: Tue Oct 27 18:32:51 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c920eb1e
sys-devel/llvm: fix compilation on armv5 Bug #562706 by maekke compiler-rt forces some -march flags when detecting arm Package-Manager: portage-2.2.23 .../cmake/llvm-3.7.0-compiler_rt_arm_march_flags.patch | 16 ++++++++++++++++ sys-devel/llvm/llvm-3.7.0-r2.ebuild | 4 ++++ 2 files changed, 20 insertions(+) diff --git a/sys-devel/llvm/files/cmake/llvm-3.7.0-compiler_rt_arm_march_flags.patch b/sys-devel/llvm/files/cmake/llvm-3.7.0-compiler_rt_arm_march_flags.patch new file mode 100644 index 0000000..943a840 --- /dev/null +++ b/sys-devel/llvm/files/cmake/llvm-3.7.0-compiler_rt_arm_march_flags.patch @@ -0,0 +1,16 @@ +diff -Naur llvm-3.7.0.src.orig/projects/compiler-rt/cmake/config-ix.cmake llvm-3.7.0.src/projects/compiler-rt/cmake/config-ix.cmake +--- llvm-3.7.0.src.orig/projects/compiler-rt/cmake/config-ix.cmake 2015-07-30 06:28:50.000000000 +0200 ++++ llvm-3.7.0.src/projects/compiler-rt/cmake/config-ix.cmake 2015-10-27 17:10:47.365847079 +0100 +@@ -209,12 +209,6 @@ + test_target_arch(mips "" "-mips32r2" "--target=mips-linux-gnu") + test_target_arch(mips64 "" "-mips64r2" "-mabi=n64") + endif() +- elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "arm") +- test_target_arch(arm "" "-march=armv7-a") +- elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "aarch32") +- test_target_arch(aarch32 "" "-march=armv8-a") +- elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "aarch64") +- test_target_arch(aarch64 "" "-march=armv8-a") + endif() + set(COMPILER_RT_OS_SUFFIX "") + endif() diff --git a/sys-devel/llvm/llvm-3.7.0-r2.ebuild b/sys-devel/llvm/llvm-3.7.0-r2.ebuild index c63f370..8856b56 100644 --- a/sys-devel/llvm/llvm-3.7.0-r2.ebuild +++ b/sys-devel/llvm/llvm-3.7.0-r2.ebuild @@ -181,6 +181,10 @@ src_prepare() { epatch "${FILESDIR}"/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch epatch "${FILESDIR}"/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch + # Do not force -march flags on arm platforms + # https://bugs.gentoo.org/show_bug.cgi?id=562706 + epatch "${FILESDIR}"/cmake/${P}-compiler_rt_arm_march_flags.patch + # Make it possible to override CLANG_LIBDIR_SUFFIX # (that is used only to find LLVMgold.so) # https://llvm.org/bugs/show_bug.cgi?id=23793