From 56026be8c0582ae073c46b47b81856fb425bf977 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Wed, 20 Apr 2011 21:40:37 +0000 Subject: clang_darwin: Always set deployment targets when building compiler-rt bits, so that we don't have a hidden dependency on possible deployment target environment overrides. - Also, add support for an ARM_SDK build variable which points to the isysroot to use for ARM bits. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@129873 91177308-0d34-0410-b5e6-96231b3b80d8 --- make/platform/clang_darwin.mk | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/make/platform/clang_darwin.mk b/make/platform/clang_darwin.mk index cf0e6cbbf..ed711e0a9 100644 --- a/make/platform/clang_darwin.mk +++ b/make/platform/clang_darwin.mk @@ -41,6 +41,26 @@ override CC := $(patsubst -arch_%,,$(CC)) CFLAGS := -Wall -Werror -O3 -fomit-frame-pointer +# Always set deployment target arguments for every build, these libraries should +# never depend on the environmental overrides. We simply set them to minimum +# supported deployment target -- nothing in the compiler-rt libraries should +# actually depend on the deployment target. +X86_DEPLOYMENT_ARGS := -mmacosx-version-min=10.4 +ARM_DEPLOYMENT_ARGS := -miphoneos-version-min=1.0 + +# If an explicit ARM_SDK build variable is set, use that as the isysroot. +ifneq ($(ARM_SDK),) +ARM_DEPLOYMENT_ARGS += -isysroot $(ARM_SDK) +endif + +CFLAGS.eprintf := $(CFLAGS) $(X86_DEPLOYMENT_ARGS) +CFLAGS.10.4 := $(CFLAGS) $(X86_DEPLOYMENT_ARGS) +CFLAGS.ios := $(CFLAGS) $(ARM_DEPLOYMENT_ARGS) +CFLAGS.cc_kext.i386 := $(CFLAGS) $(X86_DEPLOYMENT_ARGS) +CFLAGS.cc_kext.x86_64 := $(CFLAGS) $(X86_DEPLOYMENT_ARGS) +CFLAGS.cc_kext.armv6 := $(CFLAGS) $(ARM_DEPLOYMENT_ARGS) -mthumb +CFLAGS.cc_kext.armv7 := $(CFLAGS) $(ARM_DEPLOYMENT_ARGS) -mthumb + FUNCTIONS.eprintf := eprintf FUNCTIONS.10.4 := eprintf floatundidf floatundisf floatundixf @@ -162,9 +182,6 @@ CCKEXT_ARM_FUNCTIONS := $(CCKEXT_COMMON_FUNCTIONS) \ FUNCTIONS.cc_kext.armv6 := $(CCKEXT_ARM_FUNCTIONS) FUNCTIONS.cc_kext.armv7 := $(CCKEXT_ARM_FUNCTIONS) -CFLAGS.cc_kext.armv6 := $(CFLAGS) -mthumb -CFLAGS.cc_kext.armv7 := $(CFLAGS) -mthumb - CCKEXT_X86_FUNCTIONS := $(CCKEXT_COMMON_FUNCTIONS) \ divxc3 \ fixunsxfdi \ -- cgit v1.2.1