patch to fix compiler-rt builtins default arch detection for armhf

by adding the same armhf target triple handling used for compiler-rt libs
This commit is contained in:
Erik Maciejewski 2021-10-20 19:03:54 -07:00
parent d62d68611c
commit b2fc856dce
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,18 @@
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)

View File

@ -148,3 +148,4 @@ libclc-fix-prepare_builtins-rpath.diff
libcxx-libatomic-only-with-gcc-rtlib.diff
libcxxabi-fix-link-builtins.diff
llvm-runtimes-builtins-build-check.diff
compilerrt-builtins-arch-fix-armhf.diff