summaryrefslogtreecommitdiff
path: root/lib/builtins
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-08-02 17:33:19 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-08-02 17:33:19 +0000
commit005b7ed8f76756d94ef6266ded755ab7863cb936 (patch)
treede2aa8f0c2f604d3b4f81a94dd20ea0c50bf1e68 /lib/builtins
parent93c1b73a09a52d4a265f683bf1954b08bb430049 (diff)
Notes
Diffstat (limited to 'lib/builtins')
-rw-r--r--lib/builtins/CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
index 75ff66405649c..82332967b1047 100644
--- a/lib/builtins/CMakeLists.txt
+++ b/lib/builtins/CMakeLists.txt
@@ -567,6 +567,15 @@ else ()
set(_arch "arm")
endif()
+ # For ARM archs, exclude any VFP builtins if VFP is not supported
+ if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7m|armv7em)$")
+ string(REPLACE ";" " " _TARGET_${arch}_CFLAGS "${TARGET_${arch}_CFLAGS}")
+ check_compile_definition(__VFP_FP__ "${CMAKE_C_FLAGS} ${_TARGET_${arch}_CFLAGS}" COMPILER_RT_HAS_${arch}_VFP)
+ if(NOT COMPILER_RT_HAS_${arch}_VFP)
+ list(REMOVE_ITEM ${arch}_SOURCES ${arm_Thumb1_VFPv2_SOURCES} ${arm_Thumb1_SjLj_EH_SOURCES})
+ endif()
+ endif()
+
# Filter out generic versions of routines that are re-implemented in
# architecture specific manner. This prevents multiple definitions of the
# same symbols, making the symbol selection non-deterministic.