compilerrt-builtins-arch-fix-armhf
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Thu, 28 Oct 2021 14:45:49 +0000 (15:45 +0100)
committerSylvestre Ledru <sylvestre@debian.org>
Thu, 28 Oct 2021 14:45:49 +0000 (15:45 +0100)
fix builtins armhf default arch detection by adding the same armhf triple
handling use for compiler-rt

Gbp-Pq: Name compilerrt-builtins-arch-fix-armhf.diff

compiler-rt/lib/builtins/CMakeLists.txt

index 73b6bead84245394e61586caa58f840e2763b237..6d833885b2f3e66b32ece859e59b310293967b63 100644 (file)
@@ -16,6 +16,11 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
 
   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)