aboutsummaryrefslogtreecommitdiff
path: root/make/platform
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-09-06 18:41:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-09-06 18:41:23 +0000
commitf31bcc68c72371a2bf63aead9f3373a1ff2053b6 (patch)
treeb259e5d585da0f8cde9579939a74d5ef44c72abd /make/platform
parentcd2dd3df15523e2be8d2bbace27641d6ac9fa40d (diff)
downloadsrc-f31bcc68c72371a2bf63aead9f3373a1ff2053b6.tar.gz
src-f31bcc68c72371a2bf63aead9f3373a1ff2053b6.zip
Import compiler-rt 3.7.0 release (r246257).vendor/compiler-rt/compiler-rt-release_370-r246257
Notes
Notes: svn path=/vendor/compiler-rt/dist/; revision=287516 svn path=/vendor/compiler-rt/compiler-rt-release_370-r246257/; revision=287517; tag=vendor/compiler-rt/compiler-rt-release_370-r246257
Diffstat (limited to 'make/platform')
-rw-r--r--make/platform/clang_darwin.mk108
-rw-r--r--make/platform/clang_linux.mk8
-rw-r--r--make/platform/clang_macho_embedded.mk11
-rw-r--r--make/platform/darwin_bni.mk15
4 files changed, 98 insertions, 44 deletions
diff --git a/make/platform/clang_darwin.mk b/make/platform/clang_darwin.mk
index 4f71c0b46052..79925bcdd1a8 100644
--- a/make/platform/clang_darwin.mk
+++ b/make/platform/clang_darwin.mk
@@ -119,8 +119,11 @@ UniversalArchs.asan_osx_dynamic := $(call CheckArches,i386 x86_64 x86_64h,asan_o
Configs += asan_iossim_dynamic
UniversalArchs.asan_iossim_dynamic := $(call CheckArches,i386 x86_64,asan_iossim_dynamic,$(IOSSIM_SDK))
-Configs += ubsan_osx
-UniversalArchs.ubsan_osx := $(call CheckArches,i386 x86_64 x86_64h,ubsan_osx,$(OSX_SDK))
+Configs += ubsan_osx_dynamic
+UniversalArchs.ubsan_osx_dynamic := $(call CheckArches,i386 x86_64 x86_64h,ubsan_osx_dynamic,$(OSX_SDK))
+
+Configs += ubsan_iossim_dynamic
+UniversalArchs.ubsan_iossim_dynamic := $(call CheckArches,i386 x86_64,ubsan_iossim_dynamic,$(IOSSIM_SDK))
# Darwin 10.6 has a bug in cctools that makes it unable to use ranlib on our ARM
# object files. If we are on that platform, strip out all ARM archs. We still
@@ -172,26 +175,31 @@ IOSSIM_DEPLOYMENT_ARGS += -isysroot $(IOSSIM_SDK)
CFLAGS.eprintf := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
CFLAGS.10.4 := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
+SANITIZER_MACOSX_DEPLOYMENT_ARGS := -mmacosx-version-min=10.7
+SANITIZER_IOSSIM_DEPLOYMENT_ARGS := -mios-simulator-version-min=7.0 \
+ -isysroot $(IOSSIM_SDK)
+SANITIZER_CFLAGS := -fno-builtin -gline-tables-only -stdlib=libc++
+
CFLAGS.asan_osx_dynamic := \
- $(CFLAGS) -mmacosx-version-min=10.7 \
- -stdlib=libc++ \
- -isysroot $(OSX_SDK) \
- -fno-builtin \
- -gline-tables-only \
+ $(CFLAGS) $(SANITIZER_MACOSX_DEPLOYMENT_ARGS) \
+ $(SANITIZER_CFLAGS) \
-DMAC_INTERPOSE_FUNCTIONS=1 \
-DASAN_DYNAMIC=1
CFLAGS.asan_iossim_dynamic := \
- $(CFLAGS) -mios-simulator-version-min=7.0 \
- -isysroot $(IOSSIM_SDK) \
- -fno-builtin \
- -gline-tables-only \
+ $(CFLAGS) $(SANITIZER_IOSSIM_DEPLOYMENT_ARGS) \
+ $(SANITIZER_CFLAGS) \
-DMAC_INTERPOSE_FUNCTIONS=1 \
-DASAN_DYNAMIC=1
-CFLAGS.ubsan_osx := $(CFLAGS) -mmacosx-version-min=10.6 \
- -isysroot $(OSX_SDK) \
- -fno-builtin
+CFLAGS.ubsan_osx_dynamic := \
+ $(CFLAGS) $(SANITIZER_MACOSX_DEPLOYMENT_ARGS) \
+ $(SANITIZER_CFLAGS)
+
+CFLAGS.ubsan_iossim_dynamic := \
+ $(CFLAGS) $(SANITIZER_IOSSIM_DEPLOYMENT_ARGS) \
+ $(SANITIZER_CFLAGS)
+
CFLAGS.ios.i386 := $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS)
CFLAGS.ios.x86_64 := $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS)
@@ -222,49 +230,81 @@ CFLAGS.profile_ios.armv7k := $(CFLAGS) $(IOS_DEPLOYMENT_ARGS)
CFLAGS.profile_ios.armv7s := $(CFLAGS) $(IOS_DEPLOYMENT_ARGS)
CFLAGS.profile_ios.arm64 := $(CFLAGS) $(IOS6_DEPLOYMENT_ARGS)
-# Configure the asan_osx_dynamic library to be built shared.
+SANITIZER_LDFLAGS := -stdlib=libc++ -lc++ -lc++abi
+
SHARED_LIBRARY.asan_osx_dynamic := 1
-LDFLAGS.asan_osx_dynamic := -lc++ -undefined dynamic_lookup -install_name @rpath/libclang_rt.asan_osx_dynamic.dylib \
- -mmacosx-version-min=10.7 \
- -isysroot $(OSX_SDK)
+LDFLAGS.asan_osx_dynamic := $(SANITIZER_LDFLAGS) -install_name @rpath/libclang_rt.asan_osx_dynamic.dylib \
+ $(SANITIZER_MACOSX_DEPLOYMENT_ARGS)
-# Configure the asan_iossim_dynamic library to be built shared.
SHARED_LIBRARY.asan_iossim_dynamic := 1
-# configure+make uses Clang, so we're using isysroot instead of --sysroot
-# or -Wl,-syslibroot.
-LDFLAGS.asan_iossim_dynamic := -undefined dynamic_lookup -install_name @rpath/libclang_rt.asan_iossim_dynamic.dylib \
- -Wl,-ios_simulator_version_min,7.0.0 \
- -mios-simulator-version-min=7.0 -isysroot $(IOSSIM_SDK)
+LDFLAGS.asan_iossim_dynamic := $(SANITIZER_LDFLAGS) -install_name @rpath/libclang_rt.asan_iossim_dynamic.dylib \
+ -Wl,-ios_simulator_version_min,7.0.0 $(SANITIZER_IOSSIM_DEPLOYMENT_ARGS)
+
+SHARED_LIBRARY.ubsan_osx_dynamic := 1
+LDFLAGS.ubsan_osx_dynamic := $(SANITIZER_LDFLAGS) -install_name @rpath/libclang_rt.ubsan_osx_dynamic.dylib \
+ $(SANITIZER_MACOSX_DEPLOYMENT_ARGS)
+
+SHARED_LIBRARY.ubsan_iossim_dynamic := 1
+LDFLAGS.ubsan_iossim_dynamic := $(SANITIZER_LDFLAGS) -install_name @rpath/libclang_rt.ubsan_iossim_dynamic.dylib \
+ -Wl,-ios_simulator_version_min,7.0.0 $(SANITIZER_IOSSIM_DEPLOYMENT_ARGS)
+
+ifneq ($(OSX_SDK),)
+CFLAGS.asan_osx_dynamic += -isysroot $(OSX_SDK)
+LDFLAGS.asan_osx_dynamic += -isysroot $(OSX_SDK)
+CFLAGS.ubsan_osx_dynamic += -isysroot $(OSX_SDK)
+LDFLAGS.ubsan_osx_dynamic += -isysroot $(OSX_SDK)
+endif
+
+ATOMIC_FUNCTIONS := \
+ atomic_flag_clear \
+ atomic_flag_clear_explicit \
+ atomic_flag_test_and_set \
+ atomic_flag_test_and_set_explicit \
+ atomic_signal_fence \
+ atomic_thread_fence
+
+FP16_FUNCTIONS := \
+ extendhfsf2 \
+ truncdfhf2 \
+ truncsfhf2
FUNCTIONS.eprintf := eprintf
FUNCTIONS.10.4 := eprintf floatundidf floatundisf floatundixf
-FUNCTIONS.ios := divmodsi4 udivmodsi4 mulosi4 mulodi4 muloti4
+FUNCTIONS.ios := divmodsi4 udivmodsi4 mulosi4 mulodi4 muloti4 \
+ $(ATOMIC_FUNCTIONS) $(FP16_FUNCTIONS)
# On x86, the divmod functions reference divsi.
FUNCTIONS.ios.i386 := $(FUNCTIONS.ios) \
divsi3 udivsi3
FUNCTIONS.ios.x86_64 := $(FUNCTIONS.ios.i386)
-FUNCTIONS.ios.arm64 := mulsc3 muldc3 divsc3 divdc3
+FUNCTIONS.ios.arm64 := mulsc3 muldc3 divsc3 divdc3 $(ATOMIC_FUNCTIONS)
-FUNCTIONS.osx := mulosi4 mulodi4 muloti4
+FUNCTIONS.osx := mulosi4 mulodi4 muloti4 $(ATOMIC_FUNCTIONS) $(FP16_FUNCTIONS)
FUNCTIONS.profile_osx := GCDAProfiling InstrProfiling InstrProfilingBuffer \
InstrProfilingFile InstrProfilingPlatformDarwin \
- InstrProfilingRuntime
+ InstrProfilingRuntime InstrProfilingUtil
FUNCTIONS.profile_ios := $(FUNCTIONS.profile_osx)
FUNCTIONS.asan_osx_dynamic := $(AsanFunctions) $(AsanCXXFunctions) \
$(InterceptionFunctions) \
$(SanitizerCommonFunctions) \
- $(AsanDynamicFunctions)
+ $(AsanDynamicFunctions) \
+ $(UbsanFunctions) $(UbsanCXXFunctions)
FUNCTIONS.asan_iossim_dynamic := $(AsanFunctions) $(AsanCXXFunctions) \
$(InterceptionFunctions) \
$(SanitizerCommonFunctions) \
- $(AsanDynamicFunctions)
+ $(AsanDynamicFunctions) \
+ $(UbsanFunctions) $(UbsanCXXFunctions)
+
+FUNCTIONS.ubsan_osx_dynamic := $(UbsanFunctions) $(UbsanCXXFunctions) \
+ $(SanitizerCommonFunctions) \
+ $(UbsanStandaloneFunctions)
-FUNCTIONS.ubsan_osx := $(UbsanFunctions) $(UbsanCXXFunctions) \
- $(SanitizerCommonFunctions)
+FUNCTIONS.ubsan_iossim_dynamic := $(UbsanFunctions) $(UbsanCXXFunctions) \
+ $(SanitizerCommonFunctions) \
+ $(UbsanStandaloneFunctions)
CCKEXT_PROFILE_FUNCTIONS := \
InstrProfiling \
@@ -293,6 +333,7 @@ CCKEXT_COMMON_FUNCTIONS := \
udivmodsi4 \
do_global_dtors \
eprintf \
+ extendhfsf2 \
ffsdi2 \
fixdfdi \
fixsfdi \
@@ -323,6 +364,8 @@ CCKEXT_COMMON_FUNCTIONS := \
powisf2 \
subvdi3 \
subvsi3 \
+ truncdfhf2 \
+ truncsfhf2 \
ucmpdi2 \
udiv_w_sdiv \
udivdi3 \
@@ -369,6 +412,7 @@ CCKEXT_ARM_FUNCTIONS := $(CCKEXT_COMMON_FUNCTIONS) \
modsi3 \
muldf3 \
mulsf3 \
+ mulodi4 \
negdf2 \
negsf2 \
subdf3 \
diff --git a/make/platform/clang_linux.mk b/make/platform/clang_linux.mk
index cb023f3db9cc..7b109d56c0a6 100644
--- a/make/platform/clang_linux.mk
+++ b/make/platform/clang_linux.mk
@@ -74,17 +74,11 @@ CFLAGS.builtins-x86_64 := $(CFLAGS) -m64
CFLAGS.profile-i386 := $(CFLAGS) -m32
CFLAGS.profile-x86_64 := $(CFLAGS) -m64
-# Use our stub SDK as the sysroot to support more portable building. For now we
-# just do this for the core module, because the stub SDK doesn't have
-# enough support to build the profile runtime.
-CFLAGS.builtins-i386 += --sysroot=$(ProjSrcRoot)/SDKs/linux
-CFLAGS.builtins-x86_64 += --sysroot=$(ProjSrcRoot)/SDKs/linux
-
FUNCTIONS.builtins-i386 := $(CommonFunctions) $(ArchFunctions.i386)
FUNCTIONS.builtins-x86_64 := $(CommonFunctions) $(ArchFunctions.x86_64)
FUNCTIONS.profile-i386 := GCDAProfiling InstrProfiling InstrProfilingBuffer \
InstrProfilingFile InstrProfilingPlatformOther \
- InstrProfilingRuntime
+ InstrProfilingRuntime InstrProfilingUtil
FUNCTIONS.profile-x86_64 := $(FUNCTIONS.profile-i386)
# Always use optimized variants.
diff --git a/make/platform/clang_macho_embedded.mk b/make/platform/clang_macho_embedded.mk
index 76e43e66cdb7..d7870d491f15 100644
--- a/make/platform/clang_macho_embedded.mk
+++ b/make/platform/clang_macho_embedded.mk
@@ -156,6 +156,7 @@ COMMON_FUNCTIONS := \
divsf3 \
divsi3 \
extendsfdf2 \
+ extendhfsf2 \
ffssi2 \
fixdfsi \
fixsfsi \
@@ -172,11 +173,19 @@ COMMON_FUNCTIONS := \
negsf2 \
subdf3 \
subsf3 \
+ truncdfhf2 \
truncdfsf2 \
+ truncsfhf2 \
udivsi3 \
umodsi3 \
unorddf2 \
- unordsf2
+ unordsf2 \
+ atomic_flag_clear \
+ atomic_flag_clear_explicit \
+ atomic_flag_test_and_set \
+ atomic_flag_test_and_set_explicit \
+ atomic_signal_fence \
+ atomic_thread_fence
ARM_FUNCTIONS := \
aeabi_cdcmpeq \
diff --git a/make/platform/darwin_bni.mk b/make/platform/darwin_bni.mk
index 2fd5089baa92..8e066e8e31aa 100644
--- a/make/platform/darwin_bni.mk
+++ b/make/platform/darwin_bni.mk
@@ -32,7 +32,7 @@ endif
CFLAGS := -Wall -Os -fomit-frame-pointer -g $(DEPLOYMENT_FLAGS)
CFLAGS.Static := $(CFLAGS) -static
DYLIB_FLAGS := $(DEPLOYMENT_FLAGS) \
- -Xarch_arm -Wl,-alias_list,$(SRCROOT)/lib/arm/softfloat-alias.list
+ -Xarch_arm -Wl,-alias_list,$(SRCROOT)/lib/builtins/arm/softfloat-alias.list
VISIBILITY_HIDDEN := 0
VISIBILITY_HIDDEN.Static := 1
@@ -47,7 +47,11 @@ FUNCTIONS := absvdi2 absvsi2 addvdi3 addvsi3 ashldi3 ashrdi3 \
mulodi4 muloti4 mulsc3 mulvdi3 mulvsi3 negdi2 negvdi2 negvsi2 \
paritydi2 paritysi2 popcountdi2 popcountsi2 powidf2 \
powisf2 subvdi3 subvsi3 ucmpdi2 udivdi3 \
- udivmoddi4 umoddi3 apple_versioning eprintf atomic
+ udivmoddi4 umoddi3 apple_versioning eprintf atomic \
+ atomic_flag_clear atomic_flag_clear_explicit \
+ atomic_flag_test_and_set atomic_flag_test_and_set_explicit \
+ atomic_signal_fence atomic_thread_fence \
+ extendhfsf2 truncdfhf2 truncsfhf2
FUNCTIONS.i386 := $(FUNCTIONS) \
divxc3 fixunsxfdi fixunsxfsi fixxfdi floatdixf \
@@ -124,5 +128,8 @@ FUNCTIONS.arm64 := divti3 modti3 \
fixdfti fixsfti \
fixunsdfti fixunssfti fixunssfti \
floattidf floattisf floatuntidf floatuntisf \
- gcc_personality_v0 atomic
-
+ gcc_personality_v0 atomic \
+ atomic_flag_clear atomic_flag_clear_explicit \
+ atomic_flag_test_and_set \
+ atomic_flag_test_and_set_explicit \
+ atomic_signal_fence atomic_thread_fence