[compiler-rt] r193944 - Push back various changes for building Apple's compiler-rt dylib.
Eric Christopher
echristo at gmail.com
Mon Nov 4 12:09:47 PST 2013
Yep, just wanted to bring it up :)
-eric
On Mon, Nov 4, 2013 at 11:58 AM, Bob Wilson <bob.wilson at apple.com> wrote:
> It's not completely clear to me that the changes in apple_versioning.c are
> going to break ppc. Even if they do, I'm not able to test a fix for that.
> If David or anyone else wants to keep that going and needs to make changes
> here, it shouldn't be a problem to do that.
>
> On Nov 4, 2013, at 11:50 AM, Eric Christopher <echristo at gmail.com> wrote:
>
> Removing ppc support? No complaints here, but David Fang may care since
> he's been doing a lot of work to keep it going on his machine.
>
> -eric
>
>
> On Sun, Nov 3, 2013 at 12:06 AM, Bob Wilson <bob.wilson at apple.com> wrote:
>
>> Author: bwilson
>> Date: Sun Nov 3 01:06:29 2013
>> New Revision: 193944
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=193944&view=rev
>> Log:
>> Push back various changes for building Apple's compiler-rt dylib.
>>
>> These changes had accumulated internally at Apple for no good reason.
>>
>> Modified:
>> compiler-rt/trunk/lib/apple_versioning.c
>> compiler-rt/trunk/make/AppleBI.mk
>> compiler-rt/trunk/make/platform/darwin_bni.mk
>>
>> Modified: compiler-rt/trunk/lib/apple_versioning.c
>> URL:
>> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/apple_versioning.c?rev=193944&r1=193943&r2=193944&view=diff
>>
>> ==============================================================================
>> --- compiler-rt/trunk/lib/apple_versioning.c (original)
>> +++ compiler-rt/trunk/lib/apple_versioning.c Sun Nov 3 01:06:29 2013
>> @@ -9,19 +9,20 @@
>> */
>>
>>
>> -
>> #if __APPLE__
>> - #if __arm__
>> + #include <Availability.h>
>> +
>> + #if __IPHONE_OS_VERSION_MIN_REQUIRED
>> #define NOT_HERE_BEFORE_10_6(sym)
>> - #define NOT_HERE_IN_10_8_AND_EARLIER(sym)
>> - #elif __ppc__
>> - #define NOT_HERE_BEFORE_10_6(sym) \
>> - extern const char sym##_tmp3 __asm("$ld$hide$os10.3$_" #sym ); \
>> - __attribute__((visibility("default"))) const char sym##_tmp3
>> = 0; \
>> - extern const char sym##_tmp4 __asm("$ld$hide$os10.4$_" #sym ); \
>> - __attribute__((visibility("default"))) const char sym##_tmp4
>> = 0; \
>> - extern const char sym##_tmp5 __asm("$ld$hide$os10.5$_" #sym ); \
>> - __attribute__((visibility("default"))) const char sym##_tmp5
>> = 0;
>> + #define NOT_HERE_IN_10_8_AND_EARLIER(sym) \
>> + extern const char sym##_tmp61 __asm("$ld$hide$os6.1$_" #sym ); \
>> + __attribute__((visibility("default"))) const char
>> sym##_tmp61 = 0; \
>> + extern const char sym##_tmp60 __asm("$ld$hide$os6.0$_" #sym ); \
>> + __attribute__((visibility("default"))) const char
>> sym##_tmp60 = 0; \
>> + extern const char sym##_tmp51 __asm("$ld$hide$os5.1$_" #sym ); \
>> + __attribute__((visibility("default"))) const char
>> sym##_tmp51 = 0; \
>> + extern const char sym##_tmp50 __asm("$ld$hide$os5.0$_" #sym ); \
>> + __attribute__((visibility("default"))) const char
>> sym##_tmp50 = 0;
>> #else
>> #define NOT_HERE_BEFORE_10_6(sym) \
>> extern const char sym##_tmp4 __asm("$ld$hide$os10.4$_" #sym ); \
>> @@ -35,7 +36,7 @@
>> __attribute__((visibility("default"))) const char sym##_tmp7
>> = 0; \
>> extern const char sym##_tmp6 __asm("$ld$hide$os10.6$_" #sym ); \
>> __attribute__((visibility("default"))) const char sym##_tmp6
>> = 0;
>> - #endif /* __ppc__ */
>> + #endif
>>
>>
>> /* Symbols in libSystem.dylib in 10.6 and later,
>>
>> Modified: compiler-rt/trunk/make/AppleBI.mk
>> URL:
>> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/make/AppleBI.mk?rev=193944&r1=193943&r2=193944&view=diff
>>
>> ==============================================================================
>> --- compiler-rt/trunk/make/AppleBI.mk (original)
>> +++ compiler-rt/trunk/make/AppleBI.mk Sun Nov 3 01:06:29 2013
>> @@ -12,10 +12,14 @@ else
>> ProjObjRoot := $(ProjSrcRoot)
>> endif
>>
>> -ifeq (,$(SDKROOT))
>> +ifeq (,$(RC_PURPLE))
>> INSTALL_TARGET = install-MacOSX
>> else
>> - INSTALL_TARGET = install-iOS
>> + ifeq (,$(RC_INDIGO))
>> + INSTALL_TARGET = install-iOS
>> + else
>> + INSTALL_TARGET = install-iOS-Simulator
>> + endif
>> endif
>>
>>
>> @@ -61,9 +65,9 @@ $(OBJROOT)/libcompiler_rt-%.dylib : $(OB
>> -Wl,-upward-lunwind \
>> -Wl,-upward-lsystem_m \
>> -Wl,-upward-lsystem_c \
>> + -Wl,-upward-lsystem_kernel \
>> -Wl,-upward-lsystem_platform \
>> -Wl,-ldyld \
>> - -Wl,-lsystem_kernel \
>> -L$(SDKROOT)/usr/lib/system \
>> $(DYLIB_FLAGS) -Wl,-force_load,$^ -o $@
>>
>> @@ -88,7 +92,6 @@ install-iOS: $(SYMROOT)/libcompiler_rt-s
>> $(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)
>> @@ -109,3 +112,38 @@ $(SYMROOT)/libcompiler_rt-dyld.a : $(for
>> $(OBJROOT)/libcompiler_rt-dyld-$(arch).a)
>> $(call GetCNAVar,LIPO,Platform.darwin_bni,Release,) -create $^ -o
>> $@
>>
>> +
>> +
>> +# Copy results to DSTROOT.
>> +install-iOS-Simulator: $(SYMROOT)/libcompiler_rt_sim.dylib \
>> + $(SYMROOT)/libcompiler_rt-dyld.a
>> + mkdir -p $(DSTROOT)/$(SDKROOT)/usr/lib/system
>> + $(call GetCNAVar,STRIP,Platform.darwin_bni,Release,) -S
>> $(SYMROOT)/libcompiler_rt_sim.dylib \
>> + -o
>> $(DSTROOT)/$(SDKROOT)/usr/lib/system/libcompiler_rt_sim.dylib
>> + mkdir -p $(DSTROOT)/$(SDKROOT)/usr/local/lib/dyld
>> + cp $(SYMROOT)/libcompiler_rt-dyld.a \
>> +
>> $(DSTROOT)/$(SDKROOT)/usr/local/lib/dyld/libcompiler_rt.a
>> +
>> +# Rule to make fat dylib
>> +$(SYMROOT)/libcompiler_rt_sim.dylib: $(foreach arch,$(RC_ARCHS), \
>> +
>> $(OBJROOT)/libcompiler_rt_sim-$(arch).dylib)
>> + $(call GetCNAVar,LIPO,Platform.darwin_bni,Release,) -create $^ -o
>> $@
>> + $(call GetCNAVar,DSYMUTIL,Platform.darwin_bni,Release,) $@
>> +
>> +# Rule to make each dylib slice
>> +$(OBJROOT)/libcompiler_rt_sim-%.dylib :
>> $(OBJROOT)/darwin_bni/Release/%/libcompiler_rt.a
>> + echo "const char vers[] = \"@(#)
>> $(RC_ProjectName)-$(RC_ProjectSourceVersion)\"; " > $(OBJROOT)/version.c
>> + $(call GetCNAVar,CC,Platform.darwin_bni,Release,$*) \
>> + $(OBJROOT)/version.c -arch $* -dynamiclib \
>> + -install_name /usr/lib/system/libcompiler_rt_sim.dylib \
>> + -compatibility_version 1 -current_version
>> $(RC_ProjectSourceVersion) \
>> + -Wl,-unexported_symbol,___enable_execute_stack \
>> + -nostdlib \
>> + -Wl,-upward-lunwind_sim \
>> + -Wl,-upward-lsystem_sim_m \
>> + -Wl,-upward-lsystem_sim_c \
>> + -ldyld_sim \
>> + -Wl,-upward-lSystem \
>> + -umbrella System -Wl,-no_implicit_dylibs
>> -L$(SDKROOT)/usr/lib/system -dead_strip \
>> + $(DYLIB_FLAGS) -Wl,-force_load,$^ -o $@
>> +
>>
>> Modified: compiler-rt/trunk/make/platform/darwin_bni.mk
>> URL:
>> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/make/platform/darwin_bni.mk?rev=193944&r1=193943&r2=193944&view=diff
>>
>> ==============================================================================
>> --- compiler-rt/trunk/make/platform/darwin_bni.mk (original)
>> +++ compiler-rt/trunk/make/platform/darwin_bni.mk Sun Nov 3 01:06:29
>> 2013
>> @@ -9,12 +9,12 @@ Configs := Debug Release Profile Static
>> UniversalArchs := $(RC_ARCHS)
>>
>> ifneq (,$(SDKROOT))
>> - override CC := $(shell xcrun -sdk $(SDKROOT) -find clang)
>> - AR := $(shell xcrun -sdk $(SDKROOT) -find ar)
>> - RANLIB := $(shell xcrun -sdk $(SDKROOT) -find ranlib)
>> - STRIP := $(shell xcrun -sdk $(SDKROOT) -find strip)
>> - LIPO := $(shell xcrun -sdk $(SDKROOT) -find lipo)
>> - DSYMUTIL := $(shell xcrun -sdk $(SDKROOT) -find dsymutil)
>> + override CC := $(shell xcrun -sdk $(SDKROOT) -find clang || echo
>> "false")
>> + AR := $(shell xcrun -sdk $(SDKROOT) -find ar || echo "false")
>> + RANLIB := $(shell xcrun -sdk $(SDKROOT) -find ranlib || echo
>> "false")
>> + STRIP := $(shell xcrun -sdk $(SDKROOT) -find strip || echo
>> "false")
>> + LIPO := $(shell xcrun -sdk $(SDKROOT) -find lipo || echo "false")
>> + DSYMUTIL := $(shell xcrun -sdk $(SDKROOT) -find dsymutil || echo
>> "false")
>> endif
>>
>> ifneq ($(IPHONEOS_DEPLOYMENT_TARGET),)
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131104/a8606d74/attachment.html>
More information about the llvm-commits
mailing list