From ae18f308920cfacd929d562a6e71ca04f841ac35 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sun, 13 Mar 2016 16:14:29 -0500 Subject: [PATCH 1/2] don't test the soft ABI on arm*-*-*-*eabihf targets and vice versa don't test the hard ABI on arm*-*-*-eabi targets. These tests wouldn't pass anyway and this avoids a build error on *eabihf targets. --- cmake/config-ix.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index f137d51c7f..9ede367080 100644 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -207,8 +207,11 @@ 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" "--target=mips64-linux-gnu" "-mabi=n64") elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "arm") - test_target_arch(arm "" "-march=armv7-a" "-mfloat-abi=soft") - test_target_arch(armhf "" "-march=armv7-a" "-mfloat-abi=hard") + if("${COMPILER_RT_DEFAULT_TARGET_TRIPLE}" MATCHES "eabihf") + test_target_arch(armhf "" "-march=armv7-a" "-mfloat-abi=hard") + else() + test_target_arch(arm "" "-march=armv7-a" "-mfloat-abi=soft") + endif() elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "aarch32") test_target_arch(aarch32 "" "-march=armv8-a") elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "aarch64") From 81697065f676b5b74b7abaaef1dcdca145dec2dd Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sun, 13 Mar 2016 16:20:42 -0500 Subject: [PATCH 2/2] move *vfp intrinsics from the arm set into the armhf set the arm set is for targets that use the soft float (no FPU) ABI and the armhf set is for targets that use the hard float ABI. These *vfp intrinsics use FPU instructions so they can't be compiled for soft float targets. --- lib/builtins/CMakeLists.txt | 71 +++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt index 97249ea730..9f9f4304d7 100644 --- a/lib/builtins/CMakeLists.txt +++ b/lib/builtins/CMakeLists.txt @@ -220,8 +220,6 @@ else () # MSVC endif () # if (NOT MSVC) set(arm_SOURCES - arm/adddf3vfp.S - arm/addsf3vfp.S arm/aeabi_cdcmp.S arm/aeabi_cdcmpeq_check_nan.c arm/aeabi_cfcmp.S @@ -242,40 +240,11 @@ set(arm_SOURCES arm/bswapdi2.S arm/bswapsi2.S arm/comparesf2.S - arm/divdf3vfp.S arm/divmodsi4.S - arm/divsf3vfp.S arm/divsi3.S - arm/eqdf2vfp.S - arm/eqsf2vfp.S - arm/extendsfdf2vfp.S - arm/fixdfsivfp.S - arm/fixsfsivfp.S - arm/fixunsdfsivfp.S - arm/fixunssfsivfp.S - arm/floatsidfvfp.S - arm/floatsisfvfp.S - arm/floatunssidfvfp.S - arm/floatunssisfvfp.S - arm/gedf2vfp.S - arm/gesf2vfp.S - arm/gtdf2vfp.S - arm/gtsf2vfp.S - arm/ledf2vfp.S - arm/lesf2vfp.S - arm/ltdf2vfp.S - arm/ltsf2vfp.S arm/modsi3.S - arm/muldf3vfp.S - arm/mulsf3vfp.S - arm/nedf2vfp.S arm/negdf2vfp.S arm/negsf2vfp.S - arm/nesf2vfp.S - arm/restore_vfp_d8_d15_regs.S - arm/save_vfp_d8_d15_regs.S - arm/subdf3vfp.S - arm/subsf3vfp.S arm/switch16.S arm/switch32.S arm/switch8.S @@ -301,12 +270,9 @@ set(arm_SOURCES arm/sync_fetch_and_xor_4.S arm/sync_fetch_and_xor_8.S arm/sync_synchronize.S - arm/truncdfsf2vfp.S arm/udivmodsi4.S arm/udivsi3.S arm/umodsi3.S - arm/unorddf2vfp.S - arm/unordsf2vfp.S ${GENERIC_SOURCES}) set(aarch64_SOURCES @@ -328,7 +294,42 @@ set(aarch64_SOURCES trunctfsf2.c ${GENERIC_SOURCES}) -set(armhf_SOURCES ${arm_SOURCES}) +set(armhf_SOURCES + arm/adddf3vfp.S + arm/addsf3vfp.S + arm/divdf3vfp.S + arm/divsf3vfp.S + arm/eqdf2vfp.S + arm/eqsf2vfp.S + arm/extendsfdf2vfp.S + arm/fixdfsivfp.S + arm/fixsfsivfp.S + arm/fixunsdfsivfp.S + arm/fixunssfsivfp.S + arm/floatsidfvfp.S + arm/floatsisfvfp.S + arm/floatunssidfvfp.S + arm/floatunssisfvfp.S + arm/gedf2vfp.S + arm/gesf2vfp.S + arm/gtdf2vfp.S + arm/gtsf2vfp.S + arm/ledf2vfp.S + arm/lesf2vfp.S + arm/ltdf2vfp.S + arm/ltsf2vfp.S + arm/muldf3vfp.S + arm/mulsf3vfp.S + arm/nedf2vfp.S + arm/nesf2vfp.S + arm/restore_vfp_d8_d15_regs.S + arm/save_vfp_d8_d15_regs.S + arm/subdf3vfp.S + arm/subsf3vfp.S + arm/truncdfsf2vfp.S + arm/unorddf2vfp.S + arm/unordsf2vfp.S + ${arm_SOURCES}) set(armv7_SOURCES ${arm_SOURCES}) set(armv7s_SOURCES ${arm_SOURCES}) set(arm64_SOURCES ${aarch64_SOURCES})