diff options
Diffstat (limited to 'make/AppleBI.mk')
-rw-r--r-- | make/AppleBI.mk | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/make/AppleBI.mk b/make/AppleBI.mk index 0e3473d..96f8222 100644 --- a/make/AppleBI.mk +++ b/make/AppleBI.mk @@ -14,17 +14,12 @@ endif ifeq (,$(SDKROOT)) INSTALL_TARGET = install-MacOSX - LD_OTHER_FLAGS = else INSTALL_TARGET = install-iOS - CFLAGS.Release.armv6 := $(CFLAGS) -Wall -Os -fomit-frame-pointer -g -isysroot $(SDKROOT) - CFLAGS.Release.armv7 := $(CFLAGS) -Wall -Os -fomit-frame-pointer -g -isysroot $(SDKROOT) - CFLAGS.Static.armv6 := $(CFLAGS) -Wall -Os -fomit-frame-pointer -g -isysroot $(SDKROOT) -static - CFLAGS.Static.armv7 := $(CFLAGS) -Wall -Os -fomit-frame-pointer -g -isysroot $(SDKROOT) -static - LD_OTHER_FLAGS = -Wl,-alias_list,$(SRCROOT)/lib/arm/softfloat-alias.list -isysroot $(SDKROOT) endif + # Log full compile lines in B&I logs and omit summary lines. Verb := Summary := @true @@ -49,7 +44,7 @@ install-MacOSX : $(SYMROOT)/libcompiler_rt.dylib \ cp $(SYMROOT)/libcompiler_rt-dyld.a \ $(DSTROOT)/usr/local/lib/dyld/libcompiler_rt.a mkdir -p $(DSTROOT)/usr/lib/system - strip -S $(SYMROOT)/libcompiler_rt.dylib \ + $(call GetCNAVar,STRIP,Platform.darwin_bni,Release,) -S $(SYMROOT)/libcompiler_rt.dylib \ -o $(DSTROOT)/usr/lib/system/libcompiler_rt.dylib cd $(DSTROOT)/usr/lib/system; \ ln -s libcompiler_rt.dylib libcompiler_rt_profile.dylib; \ @@ -58,16 +53,17 @@ install-MacOSX : $(SYMROOT)/libcompiler_rt.dylib \ # Rule to make each dylib slice $(OBJROOT)/libcompiler_rt-%.dylib : $(OBJROOT)/darwin_bni/Release/%/libcompiler_rt.a echo "const char vers[] = \"@(#) $(RC_ProjectName)-$(RC_ProjectSourceVersion)\"; " > $(OBJROOT)/version.c - $(CC.Release) $(OBJROOT)/version.c -arch $* -dynamiclib \ + $(call GetCNAVar,CC,Platform.darwin_bni,Release,$*) \ + $(OBJROOT)/version.c -arch $* -dynamiclib \ -install_name /usr/lib/system/libcompiler_rt.dylib \ -compatibility_version 1 -current_version $(RC_ProjectSourceVersion) \ -nodefaultlibs -lSystem -umbrella System -dead_strip \ - $(LD_OTHER_FLAGS) -Wl,-force_load,$^ -o $@ + $(DYLIB_FLAGS) -Wl,-force_load,$^ -o $@ # Rule to make fat dylib -$(SYMROOT)/libcompiler_rt.dylib: $(foreach arch,$(RC_ARCHS), \ +$(SYMROOT)/libcompiler_rt.dylib: $(foreach arch,$(filter-out armv4t,$(RC_ARCHS)), \ $(OBJROOT)/libcompiler_rt-$(arch).dylib) - lipo -create $^ -o $@ + $(call GetCNAVar,LIPO,Platform.darwin_bni,Release,) -create $^ -o $@ @@ -83,25 +79,27 @@ install-iOS: $(SYMROOT)/libcompiler_rt-static.a \ cp $(SYMROOT)/libcompiler_rt-dyld.a \ $(DSTROOT)/usr/local/lib/dyld/libcompiler_rt.a mkdir -p $(DSTROOT)/usr/lib/system - strip -S $(SYMROOT)/libcompiler_rt.dylib \ + $(call GetCNAVar,STRIP,Platform.darwin_bni,Release,) -S $(SYMROOT)/libcompiler_rt.dylib \ -o $(DSTROOT)/usr/lib/system/libcompiler_rt.dylib # Rule to make fat archive $(SYMROOT)/libcompiler_rt-static.a : $(foreach arch,$(RC_ARCHS), \ $(OBJROOT)/darwin_bni/Static/$(arch)/libcompiler_rt.a) - lipo -create $^ -o $@ + $(call GetCNAVar,LIPO,Platform.darwin_bni,Release,) -create $^ -o $@ -# rule to make each archive slice for dyld +# rule to make each archive slice for dyld (which removes a few archive members) $(OBJROOT)/libcompiler_rt-dyld-%.a : $(OBJROOT)/darwin_bni/Release/%/libcompiler_rt.a cp $^ $@ - ar -d $@ apple_versioning.o - ar -d $@ gcc_personality_v0.o - ar -d $@ eprintf.o - ranlib $@ + DEL_LIST=`$(AR) -t $@ | egrep 'apple_versioning|gcc_personality_v0|eprintf' | xargs echo` ; \ + if [ -n "$${DEL_LIST}" ] ; \ + then \ + $(call GetCNAVar,AR,Platform.darwin_bni,Release,) -d $@ $${DEL_LIST}; \ + $(call GetCNAVar,RANLIB,Platform.darwin_bni,Release,) $@ ; \ + fi # rule to make make archive for dyld $(SYMROOT)/libcompiler_rt-dyld.a : $(foreach arch,$(RC_ARCHS), \ $(OBJROOT)/libcompiler_rt-dyld-$(arch).a) - lipo -create $^ -o $@ + $(call GetCNAVar,LIPO,Platform.darwin_bni,Release,) -create $^ -o $@ |