[PATCH] D13155: build: create two versions of ARM builtins

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 22:29:38 PDT 2015


compnerd created this revision.
compnerd added reviewers: jroelofs, rengolin.
compnerd added a subscriber: llvm-commits.
Herald added subscribers: rengolin, aemerson.

This adds a new name for ARM32 (armhf).  We now force that the default build for
ARM32 (arm) to be soft-float ABI.  This has a corresponding clang change to look
for these names based on the floating point ABI.  The functions are built
identically (the functions are marked as AAPCS, so the calling convention does
not change, as per the RTABI specification), however, the object file contains
attributes indicating the build configuration which the linker will ensure are
not mix and matched.  We now built the appropriate named archive so that we can
link properly.

http://reviews.llvm.org/D13155

Files:
  cmake/config-ix.cmake
  lib/builtins/CMakeLists.txt

Index: lib/builtins/CMakeLists.txt
===================================================================
--- lib/builtins/CMakeLists.txt
+++ lib/builtins/CMakeLists.txt
@@ -313,6 +313,7 @@
   trunctfsf2.c
   ${GENERIC_SOURCES})
 
+set(armhf_SOURCES ${arm_SOURCES})
 set(armv7_SOURCES ${arm_SOURCES})
 set(armv7s_SOURCES ${arm_SOURCES})
 set(arm64_SOURCES ${aarch64_SOURCES})
Index: cmake/config-ix.cmake
===================================================================
--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -207,7 +207,8 @@
     test_target_arch(mips "" "-mips32r2" "--target=mips-linux-gnu")
     test_target_arch(mips64 "" "-mips64r2" "-mabi=n64")
   elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "arm")
-    test_target_arch(arm "" "-march=armv7-a")
+    test_target_arch(arm "" "-march=armv7-a -mfloat-abi=soft")
+    test_target_arch(armhf "" "-march=armv7-a -mfloat-abi=hard")
   elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "aarch32")
     test_target_arch(aarch32 "" "-march=armv8-a")
   elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "aarch64")
@@ -246,7 +247,7 @@
 endfunction()
 
 set(ARM64 aarch64)
-set(ARM32 arm)
+set(ARM32 arm armhf)
 set(X86 i386 i686)
 set(X86_64 x86_64)
 set(MIPS32 mips mipsel)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13155.35699.patch
Type: text/x-patch
Size: 1250 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150925/aa0b4ce3/attachment.bin>


More information about the llvm-commits mailing list