@@ -14,17 +14,12 @@ endif
14
14
15
15
ifeq (,$(SDKROOT ) )
16
16
INSTALL_TARGET = install-MacOSX
17
- LD_OTHER_FLAGS =
18
17
else
19
18
INSTALL_TARGET = install-iOS
20
- CFLAGS.Release.armv6 := $(CFLAGS) -Wall -Os -fomit-frame-pointer -g -isysroot $(SDKROOT)
21
- CFLAGS.Release.armv7 := $(CFLAGS) -Wall -Os -fomit-frame-pointer -g -isysroot $(SDKROOT)
22
- CFLAGS.Static.armv6 := $(CFLAGS) -Wall -Os -fomit-frame-pointer -g -isysroot $(SDKROOT) -static
23
- CFLAGS.Static.armv7 := $(CFLAGS) -Wall -Os -fomit-frame-pointer -g -isysroot $(SDKROOT) -static
24
- LD_OTHER_FLAGS = -Wl,-alias_list,$(SRCROOT ) /lib/arm/softfloat-alias.list -isysroot $(SDKROOT )
25
19
endif
26
20
27
21
22
+
28
23
# Log full compile lines in B&I logs and omit summary lines.
29
24
Verb :=
30
25
Summary := @true
@@ -49,7 +44,7 @@ install-MacOSX : $(SYMROOT)/libcompiler_rt.dylib \
49
44
cp $(SYMROOT)/libcompiler_rt-dyld.a \
50
45
$(DSTROOT)/usr/local/lib/dyld/libcompiler_rt.a
51
46
mkdir -p $(DSTROOT)/usr/lib/system
52
- strip -S $(SYMROOT)/libcompiler_rt.dylib \
47
+ $(call GetCNAVar,STRIP,Platform.darwin_bni,Release,) -S $(SYMROOT)/libcompiler_rt.dylib \
53
48
-o $(DSTROOT)/usr/lib/system/libcompiler_rt.dylib
54
49
cd $(DSTROOT)/usr/lib/system; \
55
50
ln -s libcompiler_rt.dylib libcompiler_rt_profile.dylib; \
@@ -58,16 +53,17 @@ install-MacOSX : $(SYMROOT)/libcompiler_rt.dylib \
58
53
# Rule to make each dylib slice
59
54
$(OBJROOT ) /libcompiler_rt-% .dylib : $(OBJROOT ) /darwin_bni/Release/% /libcompiler_rt.a
60
55
echo " const char vers[] = \" @(#) $( RC_ProjectName) -$( RC_ProjectSourceVersion) \" ; " > $(OBJROOT ) /version.c
61
- $(CC.Release ) $(OBJROOT ) /version.c -arch $* -dynamiclib \
56
+ $(call GetCNAVar,CC,Platform.darwin_bni,Release,$* ) \
57
+ $(OBJROOT ) /version.c -arch $* -dynamiclib \
62
58
-install_name /usr/lib/system/libcompiler_rt.dylib \
63
59
-compatibility_version 1 -current_version $(RC_ProjectSourceVersion ) \
64
60
-nodefaultlibs -lSystem -umbrella System -dead_strip \
65
- $(LD_OTHER_FLAGS ) -Wl,-force_load,$^ -o $@
61
+ $(DYLIB_FLAGS ) -Wl,-force_load,$^ -o $@
66
62
67
63
# Rule to make fat dylib
68
64
$(SYMROOT ) /libcompiler_rt.dylib : $(foreach arch,$(RC_ARCHS ) , \
69
65
$(OBJROOT ) /libcompiler_rt-$(arch ) .dylib)
70
- lipo -create $^ -o $@
66
+ $( call GetCNAVar,LIPO,Platform.darwin_bni,Release,) -create $^ -o $@
71
67
72
68
73
69
@@ -83,25 +79,27 @@ install-iOS: $(SYMROOT)/libcompiler_rt-static.a \
83
79
cp $(SYMROOT)/libcompiler_rt-dyld.a \
84
80
$(DSTROOT)/usr/local/lib/dyld/libcompiler_rt.a
85
81
mkdir -p $(DSTROOT)/usr/lib/system
86
- strip -S $(SYMROOT)/libcompiler_rt.dylib \
82
+ $(call GetCNAVar,STRIP,Platform.darwin_bni,Release,) -S $(SYMROOT)/libcompiler_rt.dylib \
87
83
-o $(DSTROOT)/usr/lib/system/libcompiler_rt.dylib
88
84
89
85
90
86
# Rule to make fat archive
91
87
$(SYMROOT ) /libcompiler_rt-static.a : $(foreach arch,$(RC_ARCHS ) , \
92
88
$(OBJROOT ) /darwin_bni/Static/$(arch ) /libcompiler_rt.a)
93
- lipo -create $^ -o $@
89
+ $( call GetCNAVar,LIPO,Platform.darwin_bni,Release,) -create $^ -o $@
94
90
95
- # rule to make each archive slice for dyld
91
+ # rule to make each archive slice for dyld (which removes a few archive members)
96
92
$(OBJROOT ) /libcompiler_rt-dyld-% .a : $(OBJROOT ) /darwin_bni/Release/% /libcompiler_rt.a
97
93
cp $^ $@
98
- ar -d $@ apple_versioning.o
99
- ar -d $@ gcc_personality_v0.o
100
- ar -d $@ eprintf.o
101
- ranlib $@
94
+ DEL_LIST=` $( AR) -t $@ | egrep ' apple_versioning|gcc_personality_v0|eprintf' | xargs echo` ; \
95
+ if [ -n " $$ {DEL_LIST}" ] ; \
96
+ then \
97
+ $(call GetCNAVar,AR,Platform.darwin_bni,Release,) -d $@ $$ {DEL_LIST}; \
98
+ $(call GetCNAVar,RANLIB,Platform.darwin_bni,Release,) $@ ; \
99
+ fi
102
100
103
101
# rule to make make archive for dyld
104
102
$(SYMROOT ) /libcompiler_rt-dyld.a : $(foreach arch,$(RC_ARCHS ) , \
105
103
$(OBJROOT ) /libcompiler_rt-dyld-$(arch ) .a)
106
- lipo -create $^ -o $@
104
+ $( call GetCNAVar,LIPO,Platform.darwin_bni,Release,) -create $^ -o $@
107
105
0 commit comments