compilerrt-builtins-arch-fix-armhf
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Mon, 16 Oct 2023 13:14:10 +0000 (13:14 +0000)
committerAndres Salomon <dilinger@debian.org>
Mon, 16 Oct 2023 13:14:10 +0000 (13:14 +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 2fc70522895f14e47e1ae7bcfed6534fafe7cbca..65d43452ab1cf67dd0a36f7869c6cef569d91903 100644 (file)
@@ -36,6 +36,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)