llvm-toolchain/debian/patches/compilerrt-builtins-arch-fix-armhf.diff
Erik Maciejewski b2fc856dce patch to fix compiler-rt builtins default arch detection for armhf
by adding the same armhf target triple handling used for compiler-rt libs
2021-10-20 22:26:29 -07:00

19 lines
762 B
Diff

fix builtins armhf default arch detection by adding the same armhf triple
handling use for compiler-rt
Index: llvm-toolchain-12_12.0.1/compiler-rt/lib/builtins/CMakeLists.txt
===================================================================
--- llvm-toolchain-12_12.0.1.orig/compiler-rt/lib/builtins/CMakeLists.txt
+++ llvm-toolchain-12_12.0.1/compiler-rt/lib/builtins/CMakeLists.txt
@@ -16,6 +16,11 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
load_llvm_config()
construct_compiler_rt_default_triple()
+ if ("${COMPILER_RT_DEFAULT_TARGET_TRIPLE}" MATCHES ".*hf$")
+ if (${COMPILER_RT_DEFAULT_TARGET_ARCH} MATCHES "^arm")
+ set(COMPILER_RT_DEFAULT_TARGET_ARCH "armhf")
+ endif()
+ endif()
if(APPLE)
include(CompilerRTDarwinUtils)