compilerrt-builtins-arch-fix-armhf
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Wed, 4 Dec 2024 12:11:08 +0000 (13:11 +0100)
committerSylvestre Ledru <sylvestre@debian.org>
Wed, 4 Dec 2024 12:11:08 +0000 (13:11 +0100)
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 e0b2d08c207754bc5dbf12e3640feafaa7cb8e07..672e5aa1062b3e35867b8e6b03e9688e272a51a5 100644 (file)
@@ -29,6 +29,11 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
     load_llvm_config()
   endif()
   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)