aboutsummaryrefslogtreecommitdiff
path: root/make/platform
diff options
context:
space:
mode:
Diffstat (limited to 'make/platform')
-rw-r--r--make/platform/clang_darwin.mk85
-rw-r--r--make/platform/clang_darwin_test_input.c9
-rw-r--r--make/platform/clang_linux.mk3
-rw-r--r--make/platform/clang_mingw.mk30
4 files changed, 77 insertions, 50 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
diff --git a/make/platform/clang_darwin_test_input.c b/make/platform/clang_darwin_test_input.c
index b7074b852d88..b406a28a639c 100644
--- a/make/platform/clang_darwin_test_input.c
+++ b/make/platform/clang_darwin_test_input.c
@@ -4,3 +4,12 @@
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
+
+// Force us to link at least one symbol in a system library
+// to detect systems where we don't have those for a given
+// architecture.
+int main(int argc, const char **argv) {
+ int x;
+ memcpy(&x,&argc,sizeof(int));
+}
diff --git a/make/platform/clang_linux.mk b/make/platform/clang_linux.mk
index 7b109d56c0a6..bf5ee4a928fe 100644
--- a/make/platform/clang_linux.mk
+++ b/make/platform/clang_linux.mk
@@ -78,7 +78,8 @@ FUNCTIONS.builtins-i386 := $(CommonFunctions) $(ArchFunctions.i386)
FUNCTIONS.builtins-x86_64 := $(CommonFunctions) $(ArchFunctions.x86_64)
FUNCTIONS.profile-i386 := GCDAProfiling InstrProfiling InstrProfilingBuffer \
InstrProfilingFile InstrProfilingPlatformOther \
- InstrProfilingRuntime InstrProfilingUtil
+ InstrProfilingRuntime InstrProfilingUtil \
+ InstrProfilingWriter InstrProfilingValue
FUNCTIONS.profile-x86_64 := $(FUNCTIONS.profile-i386)
# Always use optimized variants.
diff --git a/make/platform/clang_mingw.mk b/make/platform/clang_mingw.mk
new file mode 100644
index 000000000000..2aedbc3526f1
--- /dev/null
+++ b/make/platform/clang_mingw.mk
@@ -0,0 +1,30 @@
+Description := Static runtime libraries for mingw-w64
+
+###
+
+CC ?= cc
+AR ?= ar
+
+Arch := unknown
+Configs :=
+
+SupportedArches := x86_64 i386 arm
+
+Configs += builtins-x86_64 builtins-i386 builtins-arm
+Arch.builtins-x86_64 := x86_64
+Arch.builtins-i386 := i386
+Arch.builtins-arm := arm
+
+###
+
+CFLAGS := -Wall -O3 -fomit-frame-pointer
+CFLAGS.builtins-x86_64 := -target x86_64-windows-gnu $(CFLAGS)
+CFLAGS.builtins-i386 := -target i686-windows-gnu $(CFLAGS)
+CFLAGS.builtins-arm := -target armv7-windows-gnu $(CFLAGS)
+
+FUNCTIONS.builtins-x86_64 := $(CommonFunctions) $(ArchFunctions.x86_64)
+FUNCTIONS.builtins-i386 := $(CommonFunctions) $(ArchFunctions.i386)
+FUNCTIONS.builtins-arm := $(CommonFunctions) $(ArchFunctions.arm)
+
+# Always use optimized variants.
+OPTIMIZED := 1