forked from OSchip/llvm-project
Update Apple-style build support for new Makefiles
llvm-svn: 93721
This commit is contained in:
parent
efd84e770b
commit
d382d17f09
|
|
@ -12,53 +12,11 @@ else
|
||||||
ProjObjRoot := $(ProjSrcRoot)
|
ProjObjRoot := $(ProjSrcRoot)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# We override this with RC_ARCHS because B&I may want to build on an ARCH we
|
|
||||||
# haven't explicitly defined support for. If all goes well, this will just work
|
|
||||||
# and the resulting lib will just have generic versions for anything unknown.
|
|
||||||
Archs := $(RC_ARCHS)
|
|
||||||
|
|
||||||
# Log full compile lines in B&I logs and omit summary lines.
|
# Log full compile lines in B&I logs and omit summary lines.
|
||||||
Verb :=
|
Verb :=
|
||||||
Summary := @true
|
Summary := @true
|
||||||
|
|
||||||
# List of functions needed for each architecture.
|
# List of functions needed for each architecture.
|
||||||
Funcs_all = absvdi2.o absvsi2.o addvdi3.o addvsi3.o ashldi3.o ashrdi3.o \
|
|
||||||
clzdi2.o clzsi2.o cmpdi2.o ctzdi2.o ctzsi2.o \
|
|
||||||
divdc3.o divdi3.o divsc3.o ffsdi2.o \
|
|
||||||
fixdfdi.o fixsfdi.o fixunsdfdi.o fixunsdfsi.o fixunssfdi.o \
|
|
||||||
fixunssfsi.o floatdidf.o floatdisf.o floatundidf.o floatundisf.o \
|
|
||||||
gcc_personality_v0.o lshrdi3.o moddi3.o muldc3.o muldi3.o \
|
|
||||||
mulsc3.o mulvdi3.o mulvsi3.o negdi2.o negvdi2.o negvsi2.o \
|
|
||||||
paritydi2.o paritysi2.o popcountdi2.o popcountsi2.o powidf2.o \
|
|
||||||
powisf2.o subvdi3.o subvsi3.o ucmpdi2.o udivdi3.o \
|
|
||||||
udivmoddi4.o umoddi3.o apple_versioning.o eprintf.o
|
|
||||||
Funcs_i386 = divxc3.o fixunsxfdi.o fixunsxfsi.o fixxfdi.o floatdixf.o \
|
|
||||||
floatundixf.o mulxc3.o powixf2.o clear_cache.o \
|
|
||||||
enable_execute_stack.o
|
|
||||||
Funcs_ppc = divtc3.o fixtfdi.o fixunstfdi.o floatditf.o floatunditf.o \
|
|
||||||
gcc_qadd.o gcc_qdiv.o gcc_qmul.o gcc_qsub.o multc3.o \
|
|
||||||
powitf2.o restFP.o saveFP.o trampoline_setup.o \
|
|
||||||
clear_cache.o enable_execute_stack.o
|
|
||||||
Funcs_x86_64 = absvti2.o addvti3.o ashlti3.o ashrti3.o clzti2.o cmpti2.o \
|
|
||||||
ctzti2.o divti3.o divxc3.o ffsti2.o fixdfti.o fixsfti.o \
|
|
||||||
fixunsdfti.o fixunssfti.o fixunsxfdi.o fixunsxfsi.o \
|
|
||||||
fixunsxfti.o fixxfdi.o fixxfti.o floatdixf.o floattidf.o \
|
|
||||||
floattisf.o floattixf.o floatundixf.o floatuntidf.o \
|
|
||||||
floatuntisf.o floatuntixf.o lshrti3.o modti3.o multi3.o \
|
|
||||||
mulvti3.o mulxc3.o negti2.o negvti2.o parityti2.o \
|
|
||||||
popcountti2.o powixf2.o subvti3.o ucmpti2.o udivmodti4.o \
|
|
||||||
udivti3.o umodti3.o clear_cache.o enable_execute_stack.o
|
|
||||||
Funcs_armv6 = adddf3vfp.o addsf3vfp.o bswapdi2.o bswapsi2.o divdf3vfp.o \
|
|
||||||
divsf3vfp.o eqdf2vfp.o eqsf2vfp.o extendsfdf2vfp.o \
|
|
||||||
fixdfsivfp.o fixsfsivfp.o fixunsdfsivfp.o fixunssfsivfp.o \
|
|
||||||
floatsidfvfp.o floatsisfvfp.o floatunssidfvfp.o floatunssisfvfp.o \
|
|
||||||
gedf2vfp.o gesf2vfp.o gtdf2vfp.o gtsf2vfp.o \
|
|
||||||
ledf2vfp.o lesf2vfp.o ltdf2vfp.o ltsf2vfp.o \
|
|
||||||
muldf3vfp.o mulsf3vfp.o \
|
|
||||||
nedf2vfp.o negdf2vfp.o negsf2vfp.o nesf2vfp.o \
|
|
||||||
subdf3vfp.o subsf3vfp.o truncdfsf2vfp.o unorddf2vfp.o unordsf2vfp.o \
|
|
||||||
modsi3.o umodsi3.o udivsi3.o divsi3.o switch.o save_restore_d8_d15.o
|
|
||||||
|
|
||||||
|
|
||||||
# Copies any public headers to DSTROOT.
|
# Copies any public headers to DSTROOT.
|
||||||
installhdrs:
|
installhdrs:
|
||||||
|
|
@ -66,31 +24,31 @@ installhdrs:
|
||||||
|
|
||||||
# Copies source code to SRCROOT.
|
# Copies source code to SRCROOT.
|
||||||
installsrc:
|
installsrc:
|
||||||
cp -r . $(SRCROOT)
|
cp -r . $(SRCROOT)
|
||||||
|
|
||||||
|
|
||||||
# Copy results to DSTROOT.
|
# Copy results to DSTROOT.
|
||||||
install: $(SYMROOT)/usr/local/lib/system/libcompiler_rt.a
|
install: $(SYMROOT)/usr/local/lib/system/libcompiler_rt.a
|
||||||
mkdir -p $(DSTROOT)/usr/local/lib/system
|
mkdir -p $(DSTROOT)/usr/local/lib/system
|
||||||
cp $(SYMROOT)/usr/local/lib/system/libcompiler_rt.a \
|
cp $(SYMROOT)/usr/local/lib/system/libcompiler_rt.a \
|
||||||
$(DSTROOT)/usr/local/lib/system/libcompiler_rt.a
|
$(DSTROOT)/usr/local/lib/system/libcompiler_rt.a
|
||||||
cd $(DSTROOT)/usr/local/lib/system; \
|
cd $(DSTROOT)/usr/local/lib/system; \
|
||||||
ln -s libcompiler_rt.a libcompiler_rt_profile.a; \
|
ln -s libcompiler_rt.a libcompiler_rt_profile.a; \
|
||||||
ln -s libcompiler_rt.a libcompiler_rt_debug.a
|
ln -s libcompiler_rt.a libcompiler_rt_debug.a
|
||||||
|
|
||||||
|
|
||||||
# Rule to make fat libcompiler_rt.a.
|
# Rule to make fat libcompiler_rt.a.
|
||||||
$(SYMROOT)/usr/local/lib/system/libcompiler_rt.a : $(foreach arch,$(Archs), \
|
$(SYMROOT)/usr/local/lib/system/libcompiler_rt.a : $(foreach arch,$(RC_ARCHS), \
|
||||||
$(OBJROOT)/$(arch)-pruned.a)
|
$(OBJROOT)/$(arch)-pruned.a)
|
||||||
mkdir -p $(SYMROOT)/usr/local/lib/system
|
mkdir -p $(SYMROOT)/usr/local/lib/system
|
||||||
lipo -create $^ -o $@
|
lipo -create $^ -o $@
|
||||||
|
|
||||||
|
|
||||||
# Rule to add project info so that "what /usr/lib/libSystem.B.dylib" will work.
|
# Rule to add project info so that "what /usr/lib/libSystem.B.dylib" will work.
|
||||||
$(OBJROOT)/%-pruned.a : $(OBJROOT)/Release/%/libcompiler_rt.Optimized.a
|
$(OBJROOT)/%-pruned.a : $(OBJROOT)/darwin_bni/Release/%/libcompiler_rt.a
|
||||||
mkdir -p $(OBJROOT)/$*.tmp
|
mkdir -p $(OBJROOT)/$*.tmp
|
||||||
cd $(OBJROOT)/$*.tmp; \
|
cd $(OBJROOT)/$*.tmp; \
|
||||||
/Developer/Makefiles/bin/version.pl $(RC_ProjectName) > $(OBJROOT)/version.c; \
|
/Developer/Makefiles/bin/version.pl $(RC_ProjectName) > $(OBJROOT)/version.c; \
|
||||||
gcc -arch $* -c ${OBJROOT}/version.c -o version.o; \
|
gcc -arch $* -c ${OBJROOT}/version.c -o version.o; \
|
||||||
ar -x $< $(Funcs_all) $(Funcs_$*); \
|
ar -x $<; \
|
||||||
libtool -static *.o -o $@
|
libtool -static *.o -o $@
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
|
||||||
|
Description := Target for Darwin using an Apple-style build.
|
||||||
|
|
||||||
|
Configs := Debug Release Profile
|
||||||
|
|
||||||
|
# We override this with RC_ARCHS because B&I may want to build on an ARCH we
|
||||||
|
# haven't explicitly defined support for. If all goes well, this will just work
|
||||||
|
# and the resulting lib will just have generic versions for anything unknown.
|
||||||
|
UniversalArchs := $(RC_ARCHS)
|
||||||
|
|
||||||
|
FUNCTIONS := absvdi2 absvsi2 addvdi3 addvsi3 ashldi3 ashrdi3 \
|
||||||
|
clzdi2 clzsi2 cmpdi2 ctzdi2 ctzsi2 \
|
||||||
|
divdc3 divdi3 divsc3 ffsdi2 \
|
||||||
|
fixdfdi fixsfdi fixunsdfdi fixunsdfsi fixunssfdi \
|
||||||
|
fixunssfsi floatdidf floatdisf floatundidf floatundisf \
|
||||||
|
gcc_personality_v0 lshrdi3 moddi3 muldc3 muldi3 \
|
||||||
|
mulsc3 mulvdi3 mulvsi3 negdi2 negvdi2 negvsi2 \
|
||||||
|
paritydi2 paritysi2 popcountdi2 popcountsi2 powidf2 \
|
||||||
|
powisf2 subvdi3 subvsi3 ucmpdi2 udivdi3 \
|
||||||
|
udivmoddi4 umoddi3 apple_versioning eprintf
|
||||||
|
|
||||||
|
FUNCTIONS.i386 := $(FUNCTIONS) \
|
||||||
|
divxc3 fixunsxfdi fixunsxfsi fixxfdi floatdixf \
|
||||||
|
floatundixf mulxc3 powixf2 clear_cache \
|
||||||
|
enable_execute_stack
|
||||||
|
FUNCTIONS.ppc := $(FUNCTIONS) \
|
||||||
|
divtc3 fixtfdi fixunstfdi floatditf floatunditf \
|
||||||
|
gcc_qadd gcc_qdiv gcc_qmul gcc_qsub multc3 \
|
||||||
|
powitf2 restFP saveFP trampoline_setup \
|
||||||
|
clear_cache enable_execute_stack
|
||||||
|
FUNCTIONS.x86_64 := $(FUNCTIONS) \
|
||||||
|
absvti2 addvti3 ashlti3 ashrti3 clzti2 cmpti2 \
|
||||||
|
ctzti2 divti3 divxc3 ffsti2 fixdfti fixsfti \
|
||||||
|
fixunsdfti fixunssfti fixunsxfdi fixunsxfsi \
|
||||||
|
fixunsxfti fixxfdi fixxfti floatdixf floattidf \
|
||||||
|
floattisf floattixf floatundixf floatuntidf \
|
||||||
|
floatuntisf floatuntixf lshrti3 modti3 multi3 \
|
||||||
|
mulvti3 mulxc3 negti2 negvti2 parityti2 \
|
||||||
|
popcountti2 powixf2 subvti3 ucmpti2 udivmodti4 \
|
||||||
|
udivti3 umodti3 clear_cache enable_execute_stack
|
||||||
|
FUNCTIONS.armv6 := $(FUNCTIONS) \
|
||||||
|
adddf3vfp addsf3vfp bswapdi2 bswapsi2 divdf3vfp \
|
||||||
|
divsf3vfp eqdf2vfp eqsf2vfp extendsfdf2vfp \
|
||||||
|
fixdfsivfp fixsfsivfp fixunsdfsivfp fixunssfsivfp \
|
||||||
|
floatsidfvfp floatsisfvfp floatunssidfvfp floatunssisfvfp \
|
||||||
|
gedf2vfp gesf2vfp gtdf2vfp gtsf2vfp \
|
||||||
|
ledf2vfp lesf2vfp ltdf2vfp ltsf2vfp \
|
||||||
|
muldf3vfp mulsf3vfp \
|
||||||
|
nedf2vfp negdf2vfp negsf2vfp nesf2vfp \
|
||||||
|
subdf3vfp subsf3vfp truncdfsf2vfp unorddf2vfp unordsf2vfp \
|
||||||
|
modsi3 umodsi3 udivsi3 divsi3 switch save_restore_d8_d15
|
||||||
|
|
||||||
Loading…
Reference in New Issue