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.

llvm-svn: 248648
This commit is contained in:
Saleem Abdulrasool 2015-09-26 03:26:01 +00:00
parent e98a074c42
commit 96c5023e53
2 changed files with 4 additions and 2 deletions

View File

@ -207,7 +207,8 @@ elseif(NOT APPLE) # Supported archs for Apple platforms are generated later
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 out_var)
endfunction()
set(ARM64 aarch64)
set(ARM32 arm)
set(ARM32 arm armhf)
set(X86 i386 i686)
set(X86_64 x86_64)
set(MIPS32 mips mipsel)

View File

@ -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})