compilerrt-builtins-arch-fix-armhf
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Fri, 4 Nov 2022 18:36:56 +0000 (18:36 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Fri, 4 Nov 2022 18:36:56 +0000 (18:36 +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 ea5ad9cdb864316503a529b4d4f1c05ff42aa64f..63f57abdcdd60419784ca75b1346fd196bd1fc07 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)