[compiler-rt] r248648 - build: create two versions of ARM builtins

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 20:26:01 PDT 2015


Author: compnerd
Date: Fri Sep 25 22:26:01 2015
New Revision: 248648

URL: http://llvm.org/viewvc/llvm-project?rev=248648&view=rev
Log:
build: create two versions of ARM builtins

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.

Modified:
    compiler-rt/trunk/cmake/config-ix.cmake
    compiler-rt/trunk/lib/builtins/CMakeLists.txt

Modified: compiler-rt/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=248648&r1=248647&r2=248648&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake (original)
+++ compiler-rt/trunk/cmake/config-ix.cmake Fri Sep 25 22:26:01 2015
@@ -207,7 +207,8 @@ elseif(NOT APPLE) # Supported archs for
     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 @@ function(get_target_flags_for_arch arch
 endfunction()
 
 set(ARM64 aarch64)
-set(ARM32 arm)
+set(ARM32 arm armhf)
 set(X86 i386 i686)
 set(X86_64 x86_64)
 set(MIPS32 mips mipsel)

Modified: compiler-rt/trunk/lib/builtins/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/CMakeLists.txt?rev=248648&r1=248647&r2=248648&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/builtins/CMakeLists.txt Fri Sep 25 22:26:01 2015
@@ -313,6 +313,7 @@ set(aarch64_SOURCES
   trunctfsf2.c
   ${GENERIC_SOURCES})
 
+set(armhf_SOURCES ${arm_SOURCES})
 set(armv7_SOURCES ${arm_SOURCES})
 set(armv7s_SOURCES ${arm_SOURCES})
 set(arm64_SOURCES ${aarch64_SOURCES})




More information about the llvm-commits mailing list