aboutsummaryrefslogtreecommitdiff
path: root/make/platform/clang_darwin.mk
diff options
context:
space:
mode:
Diffstat (limited to 'make/platform/clang_darwin.mk')
-rw-r--r--make/platform/clang_darwin.mk85
1 files changed, 36 insertions, 49 deletions
diff --git a/make/platform/clang_darwin.mk b/make/platform/clang_darwin.mk
index 79925bcdd1a8..9944481d8bee 100644
--- a/make/platform/clang_darwin.mk
+++ b/make/platform/clang_darwin.mk
@@ -17,23 +17,23 @@ CheckArches = \
result=""; \
if [ "X$(3)" != X ]; then \
for arch in $(1); do \
- if $(CC) -arch $$arch -c \
+ if $(LD) -v 2>&1 | grep "configured to support" \
+ | tr ' ' '\n' | grep "^$$arch$$" >/dev/null 2>/dev/null; then \
+ if $(CC) -arch $$arch \
-integrated-as \
$(ProjSrcRoot)/make/platform/clang_darwin_test_input.c \
-isysroot $(3) \
-o /dev/null > /dev/null 2> /dev/null; then \
- if $(LD) -v 2>&1 | grep "configured to support" \
- | tr ' ' '\n' | grep "^$$arch$$" >/dev/null 2>/dev/null; then \
- result="$$result$$arch "; \
+ result="$$result$$arch "; \
else \
printf 1>&2 \
- "warning: clang_darwin.mk: dropping arch '$$arch' from lib '$(2)'";\
- printf 1>&2 " (ld does not support it)\n"; \
+ "warning: clang_darwin.mk: dropping arch '$$arch' from lib '$(2)'"; \
+ printf 1>&2 " (clang or system libraries do not support it)\n"; \
fi; \
else \
printf 1>&2 \
- "warning: clang_darwin.mk: dropping arch '$$arch' from lib '$(2)'"; \
- printf 1>&2 " (clang does not support it)\n"; \
+ "warning: clang_darwin.mk: dropping arch '$$arch' from lib '$(2)'";\
+ printf 1>&2 " (ld does not support it)\n"; \
fi; \
done; \
fi; \
@@ -96,14 +96,10 @@ UniversalArchs.osx := $(call CheckArches,i386 x86_64 x86_64h,osx,$(OSX_SDK))
# Configuration for use with kernel/kexts.
Configs += cc_kext
UniversalArchs.cc_kext := $(call CheckArches,i386 x86_64 x86_64h,cc_kext,$(OSX_SDK))
-UniversalArchs.cc_kext += $(call CheckArches,armv7 arm64,cc_kext,$(IOS_SDK))
-# Configuration for use with kernel/kexts for iOS 5.0 and earlier (which used
-# a different code generation strategy). Note: the x86_64 slice is unused but
-# it avoids build problems (see pr14013).
-Configs += cc_kext_ios5
-UniversalArchs.cc_kext_ios5 := $(call CheckArches,x86_64,cc_kext_ios5,$(IOSSIM_SDK))
-UniversalArchs.cc_kext_ios5 += $(call CheckArches,armv7,cc_kext_ios5,$(IOS_SDK))
+# Configuration for use with iOS kernel/kexts
+Configs += cc_kext_ios
+UniversalArchs.cc_kext_ios += $(call CheckArches,armv7,cc_kext_ios,$(IOS_SDK))
# Configurations which define the profiling support functions.
Configs += profile_osx
@@ -131,8 +127,7 @@ UniversalArchs.ubsan_iossim_dynamic := $(call CheckArches,i386 x86_64,ubsan_ioss
# them, even though they might not have an expected slice.
ifneq ($(shell test -x /usr/bin/sw_vers && sw_vers -productVersion | grep 10.6),)
UniversalArchs.ios := $(filter-out armv7, $(UniversalArchs.ios))
-UniversalArchs.cc_kext := $(filter-out armv7, $(UniversalArchs.cc_kext))
-UniversalArchs.cc_kext_ios5 := $(filter-out armv7, $(UniversalArchs.cc_kext_ios5))
+UniversalArchs.cc_kext_ios := $(filter-out armv7, $(UniversalArchs.cc_kext_ios))
UniversalArchs.profile_ios := $(filter-out armv7, $(UniversalArchs.profile_ios))
endif
@@ -213,13 +208,10 @@ CFLAGS.osx.x86_64h := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
CFLAGS.cc_kext.i386 := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
CFLAGS.cc_kext.x86_64 := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
CFLAGS.cc_kext.x86_64h := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
-CFLAGS.cc_kext.armv7 := $(CFLAGS) $(IOS6_DEPLOYMENT_ARGS)
-CFLAGS.cc_kext.armv7k := $(CFLAGS) $(IOS6_DEPLOYMENT_ARGS)
-CFLAGS.cc_kext.armv7s := $(CFLAGS) $(IOS6_DEPLOYMENT_ARGS)
-CFLAGS.cc_kext.arm64 := $(CFLAGS) $(IOS6_DEPLOYMENT_ARGS)
-CFLAGS.cc_kext_ios5.armv7 := $(CFLAGS) $(IOS_DEPLOYMENT_ARGS)
-CFLAGS.cc_kext_ios5.armv7k := $(CFLAGS) $(IOS_DEPLOYMENT_ARGS)
-CFLAGS.cc_kext_ios5.armv7s := $(CFLAGS) $(IOS_DEPLOYMENT_ARGS)
+CFLAGS.cc_kext_ios.armv7 := $(CFLAGS) $(IOS6_DEPLOYMENT_ARGS)
+CFLAGS.cc_kext_ios.armv7k := $(CFLAGS) $(IOS6_DEPLOYMENT_ARGS)
+CFLAGS.cc_kext_ios.armv7s := $(CFLAGS) $(IOS6_DEPLOYMENT_ARGS)
+CFLAGS.cc_kext_ios.arm64 := $(CFLAGS) $(IOS6_DEPLOYMENT_ARGS)
CFLAGS.profile_osx.i386 := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
CFLAGS.profile_osx.x86_64 := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
CFLAGS.profile_osx.x86_64h := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
@@ -277,13 +269,15 @@ FUNCTIONS.ios := divmodsi4 udivmodsi4 mulosi4 mulodi4 muloti4 \
FUNCTIONS.ios.i386 := $(FUNCTIONS.ios) \
divsi3 udivsi3
FUNCTIONS.ios.x86_64 := $(FUNCTIONS.ios.i386)
-FUNCTIONS.ios.arm64 := mulsc3 muldc3 divsc3 divdc3 $(ATOMIC_FUNCTIONS)
+FUNCTIONS.ios.arm64 := mulsc3 muldc3 divsc3 divdc3 udivti3 umodti3 \
+ $(ATOMIC_FUNCTIONS)
FUNCTIONS.osx := mulosi4 mulodi4 muloti4 $(ATOMIC_FUNCTIONS) $(FP16_FUNCTIONS)
FUNCTIONS.profile_osx := GCDAProfiling InstrProfiling InstrProfilingBuffer \
InstrProfilingFile InstrProfilingPlatformDarwin \
- InstrProfilingRuntime InstrProfilingUtil
+ InstrProfilingRuntime InstrProfilingUtil \
+ InstrProfilingWriter InstrProfilingValue
FUNCTIONS.profile_ios := $(FUNCTIONS.profile_osx)
FUNCTIONS.asan_osx_dynamic := $(AsanFunctions) $(AsanCXXFunctions) \
@@ -466,15 +460,14 @@ CCKEXT_ARM64_FUNCTIONS := \
divdc3 \
divsc3 \
muldc3 \
- mulsc3
+ mulsc3 \
+ udivti3 \
+ umodti3
-FUNCTIONS.cc_kext.armv7 := $(CCKEXT_ARMVFP_FUNCTIONS)
-FUNCTIONS.cc_kext.armv7k := $(CCKEXT_ARMVFP_FUNCTIONS)
-FUNCTIONS.cc_kext.armv7s := $(CCKEXT_ARMVFP_FUNCTIONS)
-FUNCTIONS.cc_kext.arm64 := $(CCKEXT_ARM64_FUNCTIONS)
-FUNCTIONS.cc_kext_ios5.armv7 := $(CCKEXT_ARMVFP_FUNCTIONS)
-FUNCTIONS.cc_kext_ios5.armv7k := $(CCKEXT_ARMVFP_FUNCTIONS)
-FUNCTIONS.cc_kext_ios5.armv7s := $(CCKEXT_ARMVFP_FUNCTIONS)
+FUNCTIONS.cc_kext_ios.armv7 := $(CCKEXT_ARMVFP_FUNCTIONS)
+FUNCTIONS.cc_kext_ios.armv7k := $(CCKEXT_ARMVFP_FUNCTIONS)
+FUNCTIONS.cc_kext_ios.armv7s := $(CCKEXT_ARMVFP_FUNCTIONS)
+FUNCTIONS.cc_kext_ios.arm64 := $(CCKEXT_ARM64_FUNCTIONS)
CCKEXT_X86_FUNCTIONS := $(CCKEXT_COMMON_FUNCTIONS) \
divxc3 \
@@ -551,20 +544,14 @@ CCKEXT_MISSING_FUNCTIONS := \
aeabi_fcmpge aeabi_fcmpgt aeabi_fcmple aeabi_fcmplt aeabi_frsub aeabi_idivmod \
aeabi_uidivmod
-FUNCTIONS.cc_kext.armv7 := \
- $(filter-out $(CCKEXT_MISSING_FUNCTIONS),$(FUNCTIONS.cc_kext.armv7))
-FUNCTIONS.cc_kext.armv7k := \
- $(filter-out $(CCKEXT_MISSING_FUNCTIONS),$(FUNCTIONS.cc_kext.armv7k))
-FUNCTIONS.cc_kext.armv7s := \
- $(filter-out $(CCKEXT_MISSING_FUNCTIONS),$(FUNCTIONS.cc_kext.armv7s))
-FUNCTIONS.cc_kext.arm64 := \
- $(filter-out $(CCKEXT_MISSING_FUNCTIONS),$(FUNCTIONS.cc_kext.arm64))
-FUNCTIONS.cc_kext_ios5.armv7 := \
- $(filter-out $(CCKEXT_MISSING_FUNCTIONS),$(FUNCTIONS.cc_kext_ios5.armv7))
-FUNCTIONS.cc_kext_ios5.armv7k := \
- $(filter-out $(CCKEXT_MISSING_FUNCTIONS),$(FUNCTIONS.cc_kext_ios5.armv7k))
-FUNCTIONS.cc_kext_ios5.armv7s := \
- $(filter-out $(CCKEXT_MISSING_FUNCTIONS),$(FUNCTIONS.cc_kext_ios5.armv7s))
+FUNCTIONS.cc_kext_ios.armv7 := \
+ $(filter-out $(CCKEXT_MISSING_FUNCTIONS),$(FUNCTIONS.cc_kext_ios.armv7))
+FUNCTIONS.cc_kext_ios.armv7k := \
+ $(filter-out $(CCKEXT_MISSING_FUNCTIONS),$(FUNCTIONS.cc_kext_ios.armv7k))
+FUNCTIONS.cc_kext_ios.armv7s := \
+ $(filter-out $(CCKEXT_MISSING_FUNCTIONS),$(FUNCTIONS.cc_kext_ios.armv7s))
+FUNCTIONS.cc_kext_ios.arm64 := \
+ $(filter-out $(CCKEXT_MISSING_FUNCTIONS),$(FUNCTIONS.cc_kext_ios.arm64))
FUNCTIONS.cc_kext.i386 := \
$(filter-out $(CCKEXT_MISSING_FUNCTIONS),$(FUNCTIONS.cc_kext.i386))
FUNCTIONS.cc_kext.x86_64 := \
@@ -573,7 +560,7 @@ FUNCTIONS.cc_kext.x86_64h := \
$(filter-out $(CCKEXT_MISSING_FUNCTIONS),$(FUNCTIONS.cc_kext.x86_64h))
KERNEL_USE.cc_kext := 1
-KERNEL_USE.cc_kext_ios5 := 1
+KERNEL_USE.cc_kext_ios := 1
VISIBILITY_HIDDEN := 1