compilerrt-builtins-arch-fix-armhf
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Wed, 30 Nov 2022 15:15:42 +0000 (15:15 +0000)
committerGianfranco Costamagna <locutusofborg@debian.org>
Wed, 30 Nov 2022 15:15:42 +0000 (15:15 +0000)
fix builtins armhf default arch detection by adding the same armhf triple
handling use for compiler-rt

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

compiler-rt/lib/builtins/CMakeLists.txt

index df02682ae00f99e8bdea33e3ed3496af8748a9bd..67a6a05a601274f0bd43518e8f3cb586e388f97d 100644 (file)
@@ -27,6 +27,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()
 
   include(SetPlatformToolchainTools)
   if(APPLE)