From 8b0309b06af08d089259733c7ee96fb35b80a23c Mon Sep 17 00:00:00 2001 From: angelsl Date: Wed, 28 Oct 2015 10:51:12 +0800 Subject: [PATCH 1/4] Rust: delete other platforms' makefiles to prevent conflicts clang_linux.mk was complaining on AArch64. These makefiles create targets that are never used anyway, so let's remove them. --- make/platform/clang_darwin.mk | 566 ------------------ make/platform/clang_darwin_test_input.c | 15 - make/platform/clang_linux.mk | 90 --- make/platform/clang_linux_test_input.c | 4 - make/platform/clang_macho_embedded.mk | 297 --------- .../clang_macho_embedded_test_input.c | 0 make/platform/darwin_bni.mk | 135 ----- make/platform/multi_arch.mk | 15 - 8 files changed, 1122 deletions(-) delete mode 100644 make/platform/clang_darwin.mk delete mode 100644 make/platform/clang_darwin_test_input.c delete mode 100644 make/platform/clang_linux.mk delete mode 100644 make/platform/clang_linux_test_input.c delete mode 100644 make/platform/clang_macho_embedded.mk delete mode 100644 make/platform/clang_macho_embedded_test_input.c delete mode 100644 make/platform/darwin_bni.mk delete mode 100644 make/platform/multi_arch.mk diff --git a/make/platform/clang_darwin.mk b/make/platform/clang_darwin.mk deleted file mode 100644 index ecee33c857..0000000000 --- a/make/platform/clang_darwin.mk +++ /dev/null @@ -1,566 +0,0 @@ -# These are the functions which clang needs when it is targeting a previous -# version of the OS. The issue is that the backend may use functions which were -# not present in the libgcc that shipped on the platform. In such cases, we link -# with a version of the library which contains private_extern definitions of all -# the extra functions which might be referenced. - -Description := Static runtime libraries for clang/Darwin. - -# A function that ensures we don't try to build for architectures and SDKs -# that we don't have working toolchains for. Arguments: -# (1): List of architectures -# (2): Library name -# (3): SDK path -# The result is a possibly empty subset of the architectures from argument 1. -CheckArches = \ - $(shell \ - result=""; \ - if [ "X$(3)" != X ]; then \ - for arch in $(1); do \ - if $(LD) -v 2>&1 | grep "configured to support" \ - | tr ' ' '\n' | grep "^$$arch$$" >/dev/null 2>/dev/null; then \ - if $(CC) -arch $$arch \ - -integrated-as \ - $(ProjSrcRoot)/make/platform/clang_darwin_test_input.c \ - -isysroot $(3) \ - -o /dev/null > /dev/null 2> /dev/null; then \ - result="$$result$$arch "; \ - else \ - printf 1>&2 \ - "warning: clang_darwin.mk: dropping arch '$$arch' from lib '$(2)'"; \ - printf 1>&2 " (clang or system libraries do not support it)\n"; \ - fi; \ - else \ - printf 1>&2 \ - "warning: clang_darwin.mk: dropping arch '$$arch' from lib '$(2)'";\ - printf 1>&2 " (ld does not support it)\n"; \ - fi; \ - done; \ - fi; \ - echo $$result) - -XCRun = \ - $(shell \ - result=`xcrun -find $(1) 2> /dev/null`; \ - if [ "$$?" != "0" ]; then result=$(1); fi; \ - echo $$result) -# Prefer building with the internal SDKs. -XCRunSdkPath = \ - $(shell \ - result=`xcrun --sdk $(1).internal --show-sdk-path 2> /dev/null`; \ - if [ "$$?" != "0" ]; then \ - result=`xcrun --sdk $(1) --show-sdk-path 2> /dev/null`; \ - if [ "$$?" != "0" ]; then result=""; fi; \ - fi; \ - echo $$result) -### - -CC := $(call XCRun,clang) -LD := $(shell $(CC) -print-prog-name=ld) -AR := $(call XCRun,ar) -RANLIB := $(call XCRun,ranlib) -STRIP := $(call XCRun,strip) -LIPO := $(call XCRun,lipo) -DSYMUTIL := $(call XCRun,dsymutil) - -OSX_SDK := $(call XCRunSdkPath,macosx) -IOS_SDK := $(call XCRunSdkPath,iphoneos) -IOSSIM_SDK := $(call XCRunSdkPath,iphonesimulator) - -Configs := -UniversalArchs := - -# Configuration solely for providing access to an eprintf symbol, which may -# still be referenced from Darwin system headers. This symbol is only ever -# needed on i386. -Configs += eprintf -UniversalArchs.eprintf := $(call CheckArches,i386,eprintf,$(OSX_SDK)) - -# Configuration for targeting 10.4. We need a few functions missing from -# libgcc_s.10.4.dylib. We only build x86 slices since clang doesn't really -# support targeting PowerPC. -Configs += 10.4 -UniversalArchs.10.4 := $(call CheckArches,i386 x86_64,10.4,$(OSX_SDK)) - -# Configuration for targeting iOS for a couple of functions that didn't -# make it into libSystem. -Configs += ios -UniversalArchs.ios := $(call CheckArches,i386 x86_64,ios,$(IOSSIM_SDK)) -UniversalArchs.ios += $(call CheckArches,armv7 arm64,ios,$(IOS_SDK)) - -# Configuration for targeting OSX. These functions may not be in libSystem -# so we should provide our own. -Configs += osx -UniversalArchs.osx := $(call CheckArches,i386 x86_64 x86_64h,osx,$(OSX_SDK)) - -# Configuration for use with kernel/kexts. -Configs += cc_kext -UniversalArchs.cc_kext := $(call CheckArches,i386 x86_64 x86_64h,cc_kext,$(OSX_SDK)) - -# Configuration for use with iOS kernel/kexts -Configs += cc_kext_ios -UniversalArchs.cc_kext_ios += $(call CheckArches,armv7,cc_kext_ios,$(IOS_SDK)) - -# Configurations which define the profiling support functions. -Configs += profile_osx -UniversalArchs.profile_osx := $(call CheckArches,i386 x86_64 x86_64h,profile_osx,$(OSX_SDK)) -Configs += profile_ios -UniversalArchs.profile_ios := $(call CheckArches,i386 x86_64,profile_ios,$(IOSSIM_SDK)) -UniversalArchs.profile_ios += $(call CheckArches,armv7 arm64,profile_ios,$(IOS_SDK)) - -# Configurations which define the ASAN support functions. -Configs += asan_osx_dynamic -UniversalArchs.asan_osx_dynamic := $(call CheckArches,i386 x86_64 x86_64h,asan_osx_dynamic,$(OSX_SDK)) - -Configs += asan_iossim_dynamic -UniversalArchs.asan_iossim_dynamic := $(call CheckArches,i386 x86_64,asan_iossim_dynamic,$(IOSSIM_SDK)) - -Configs += ubsan_osx_dynamic -UniversalArchs.ubsan_osx_dynamic := $(call CheckArches,i386 x86_64 x86_64h,ubsan_osx_dynamic,$(OSX_SDK)) - -Configs += ubsan_iossim_dynamic -UniversalArchs.ubsan_iossim_dynamic := $(call CheckArches,i386 x86_64,ubsan_iossim_dynamic,$(IOSSIM_SDK)) - -# Darwin 10.6 has a bug in cctools that makes it unable to use ranlib on our ARM -# object files. If we are on that platform, strip out all ARM archs. We still -# build the libraries themselves so that Clang can find them where it expects -# them, even though they might not have an expected slice. -ifneq ($(shell test -x /usr/bin/sw_vers && sw_vers -productVersion | grep 10.6),) -UniversalArchs.ios := $(filter-out armv7, $(UniversalArchs.ios)) -UniversalArchs.cc_kext_ios := $(filter-out armv7, $(UniversalArchs.cc_kext_ios)) -UniversalArchs.profile_ios := $(filter-out armv7, $(UniversalArchs.profile_ios)) -endif - -# If RC_SUPPORTED_ARCHS is defined, treat it as a list of the architectures we -# are intended to support and limit what we try to build to that. -ifneq ($(RC_SUPPORTED_ARCHS),) -$(foreach config,$(Configs),\ - $(call Set,UniversalArchs.$(config),\ - $(filter $(RC_SUPPORTED_ARCHS),$(UniversalArchs.$(config))))) -endif - -# Remove empty configs if we end up dropping all the requested -# archs for a particular config. -$(foreach config,$(Configs),\ - $(if $(strip $(UniversalArchs.$(config))),,\ - $(call Set,Configs,$(filter-out $(config),$(Configs))))) - -### - -# Forcibly strip off any -arch, as that totally breaks our universal support. -override CC := $(subst -arch ,-arch_,$(CC)) -override CC := $(patsubst -arch_%,,$(CC)) - -CFLAGS := -fPIC -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. -OSX_DEPLOYMENT_ARGS := -mmacosx-version-min=10.4 -IOS_DEPLOYMENT_ARGS := -mios-version-min=1.0 -IOS6_DEPLOYMENT_ARGS := -mios-version-min=6.0 -IOSSIM_DEPLOYMENT_ARGS := -mios-simulator-version-min=1.0 - -OSX_DEPLOYMENT_ARGS += -isysroot $(OSX_SDK) -IOS_DEPLOYMENT_ARGS += -isysroot $(IOS_SDK) -IOS6_DEPLOYMENT_ARGS += -isysroot $(IOS_SDK) -IOSSIM_DEPLOYMENT_ARGS += -isysroot $(IOSSIM_SDK) - -CFLAGS.eprintf := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS) -CFLAGS.10.4 := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS) - -SANITIZER_MACOSX_DEPLOYMENT_ARGS := -mmacosx-version-min=10.7 -SANITIZER_IOSSIM_DEPLOYMENT_ARGS := -mios-simulator-version-min=7.0 \ - -isysroot $(IOSSIM_SDK) -SANITIZER_CFLAGS := -fno-builtin -gline-tables-only -stdlib=libc++ - -CFLAGS.asan_osx_dynamic := \ - $(CFLAGS) $(SANITIZER_MACOSX_DEPLOYMENT_ARGS) \ - $(SANITIZER_CFLAGS) \ - -DMAC_INTERPOSE_FUNCTIONS=1 \ - -DASAN_DYNAMIC=1 - -CFLAGS.asan_iossim_dynamic := \ - $(CFLAGS) $(SANITIZER_IOSSIM_DEPLOYMENT_ARGS) \ - $(SANITIZER_CFLAGS) \ - -DMAC_INTERPOSE_FUNCTIONS=1 \ - -DASAN_DYNAMIC=1 - -CFLAGS.ubsan_osx_dynamic := \ - $(CFLAGS) $(SANITIZER_MACOSX_DEPLOYMENT_ARGS) \ - $(SANITIZER_CFLAGS) - -CFLAGS.ubsan_iossim_dynamic := \ - $(CFLAGS) $(SANITIZER_IOSSIM_DEPLOYMENT_ARGS) \ - $(SANITIZER_CFLAGS) - - -CFLAGS.ios.i386 := $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS) -CFLAGS.ios.x86_64 := $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS) -CFLAGS.ios.armv7 := $(CFLAGS) $(IOS_DEPLOYMENT_ARGS) -CFLAGS.ios.armv7k := $(CFLAGS) $(IOS_DEPLOYMENT_ARGS) -CFLAGS.ios.armv7s := $(CFLAGS) $(IOS_DEPLOYMENT_ARGS) -CFLAGS.ios.arm64 := $(CFLAGS) $(IOS6_DEPLOYMENT_ARGS) -CFLAGS.osx.i386 := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS) -CFLAGS.osx.x86_64 := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS) -CFLAGS.osx.x86_64h := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS) -CFLAGS.cc_kext.i386 := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS) -CFLAGS.cc_kext.x86_64 := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS) -CFLAGS.cc_kext.x86_64h := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS) -CFLAGS.cc_kext_ios.armv7 := $(CFLAGS) $(IOS6_DEPLOYMENT_ARGS) -CFLAGS.cc_kext_ios.armv7k := $(CFLAGS) $(IOS6_DEPLOYMENT_ARGS) -CFLAGS.cc_kext_ios.armv7s := $(CFLAGS) $(IOS6_DEPLOYMENT_ARGS) -CFLAGS.cc_kext_ios.arm64 := $(CFLAGS) $(IOS6_DEPLOYMENT_ARGS) -CFLAGS.profile_osx.i386 := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS) -CFLAGS.profile_osx.x86_64 := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS) -CFLAGS.profile_osx.x86_64h := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS) -CFLAGS.profile_ios.i386 := $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS) -CFLAGS.profile_ios.x86_64 := $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS) -CFLAGS.profile_ios.armv7 := $(CFLAGS) $(IOS_DEPLOYMENT_ARGS) -CFLAGS.profile_ios.armv7k := $(CFLAGS) $(IOS_DEPLOYMENT_ARGS) -CFLAGS.profile_ios.armv7s := $(CFLAGS) $(IOS_DEPLOYMENT_ARGS) -CFLAGS.profile_ios.arm64 := $(CFLAGS) $(IOS6_DEPLOYMENT_ARGS) - -SANITIZER_LDFLAGS := -stdlib=libc++ -lc++ -lc++abi - -SHARED_LIBRARY.asan_osx_dynamic := 1 -LDFLAGS.asan_osx_dynamic := $(SANITIZER_LDFLAGS) -install_name @rpath/libclang_rt.asan_osx_dynamic.dylib \ - $(SANITIZER_MACOSX_DEPLOYMENT_ARGS) - -SHARED_LIBRARY.asan_iossim_dynamic := 1 -LDFLAGS.asan_iossim_dynamic := $(SANITIZER_LDFLAGS) -install_name @rpath/libclang_rt.asan_iossim_dynamic.dylib \ - -Wl,-ios_simulator_version_min,7.0.0 $(SANITIZER_IOSSIM_DEPLOYMENT_ARGS) - -SHARED_LIBRARY.ubsan_osx_dynamic := 1 -LDFLAGS.ubsan_osx_dynamic := $(SANITIZER_LDFLAGS) -install_name @rpath/libclang_rt.ubsan_osx_dynamic.dylib \ - $(SANITIZER_MACOSX_DEPLOYMENT_ARGS) - -SHARED_LIBRARY.ubsan_iossim_dynamic := 1 -LDFLAGS.ubsan_iossim_dynamic := $(SANITIZER_LDFLAGS) -install_name @rpath/libclang_rt.ubsan_iossim_dynamic.dylib \ - -Wl,-ios_simulator_version_min,7.0.0 $(SANITIZER_IOSSIM_DEPLOYMENT_ARGS) - -ifneq ($(OSX_SDK),) -CFLAGS.asan_osx_dynamic += -isysroot $(OSX_SDK) -LDFLAGS.asan_osx_dynamic += -isysroot $(OSX_SDK) -CFLAGS.ubsan_osx_dynamic += -isysroot $(OSX_SDK) -LDFLAGS.ubsan_osx_dynamic += -isysroot $(OSX_SDK) -endif - -ATOMIC_FUNCTIONS := \ - atomic_flag_clear \ - atomic_flag_clear_explicit \ - atomic_flag_test_and_set \ - atomic_flag_test_and_set_explicit \ - atomic_signal_fence \ - atomic_thread_fence - -FP16_FUNCTIONS := \ - extendhfsf2 \ - truncdfhf2 \ - truncsfhf2 - -FUNCTIONS.eprintf := eprintf -FUNCTIONS.10.4 := eprintf floatundidf floatundisf floatundixf - -FUNCTIONS.ios := divmodsi4 udivmodsi4 mulosi4 mulodi4 muloti4 \ - $(ATOMIC_FUNCTIONS) $(FP16_FUNCTIONS) -# On x86, the divmod functions reference divsi. -FUNCTIONS.ios.i386 := $(FUNCTIONS.ios) \ - divsi3 udivsi3 -FUNCTIONS.ios.x86_64 := $(FUNCTIONS.ios.i386) -FUNCTIONS.ios.arm64 := mulsc3 muldc3 divsc3 divdc3 udivti3 umodti3 \ - $(ATOMIC_FUNCTIONS) - -FUNCTIONS.osx := mulosi4 mulodi4 muloti4 $(ATOMIC_FUNCTIONS) $(FP16_FUNCTIONS) - -FUNCTIONS.profile_osx := GCDAProfiling InstrProfiling InstrProfilingBuffer \ - InstrProfilingFile InstrProfilingPlatformDarwin \ - InstrProfilingRuntime InstrProfilingUtil -FUNCTIONS.profile_ios := $(FUNCTIONS.profile_osx) - -FUNCTIONS.asan_osx_dynamic := $(AsanFunctions) $(AsanCXXFunctions) \ - $(InterceptionFunctions) \ - $(SanitizerCommonFunctions) \ - $(AsanDynamicFunctions) \ - $(UbsanFunctions) $(UbsanCXXFunctions) - -FUNCTIONS.asan_iossim_dynamic := $(AsanFunctions) $(AsanCXXFunctions) \ - $(InterceptionFunctions) \ - $(SanitizerCommonFunctions) \ - $(AsanDynamicFunctions) \ - $(UbsanFunctions) $(UbsanCXXFunctions) - -FUNCTIONS.ubsan_osx_dynamic := $(UbsanFunctions) $(UbsanCXXFunctions) \ - $(SanitizerCommonFunctions) \ - $(UbsanStandaloneFunctions) - -FUNCTIONS.ubsan_iossim_dynamic := $(UbsanFunctions) $(UbsanCXXFunctions) \ - $(SanitizerCommonFunctions) \ - $(UbsanStandaloneFunctions) - -CCKEXT_PROFILE_FUNCTIONS := \ - InstrProfiling \ - InstrProfilingBuffer \ - InstrProfilingPlatformDarwin - -CCKEXT_COMMON_FUNCTIONS := \ - $(CCKEXT_PROFILE_FUNCTIONS) \ - absvdi2 \ - absvsi2 \ - addvdi3 \ - addvsi3 \ - ashldi3 \ - ashrdi3 \ - bswapdi2 \ - bswapsi2 \ - clzdi2 \ - clzsi2 \ - cmpdi2 \ - ctzdi2 \ - ctzsi2 \ - divdc3 \ - divdi3 \ - divsc3 \ - divmodsi4 \ - udivmodsi4 \ - do_global_dtors \ - eprintf \ - extendhfsf2 \ - ffsdi2 \ - fixdfdi \ - fixsfdi \ - fixunsdfdi \ - fixunsdfsi \ - fixunssfdi \ - fixunssfsi \ - floatdidf \ - floatdisf \ - floatundidf \ - floatundisf \ - gcc_bcmp \ - lshrdi3 \ - moddi3 \ - muldc3 \ - muldi3 \ - mulsc3 \ - mulvdi3 \ - mulvsi3 \ - negdi2 \ - negvdi2 \ - negvsi2 \ - paritydi2 \ - paritysi2 \ - popcountdi2 \ - popcountsi2 \ - powidf2 \ - powisf2 \ - subvdi3 \ - subvsi3 \ - truncdfhf2 \ - truncsfhf2 \ - ucmpdi2 \ - udiv_w_sdiv \ - udivdi3 \ - udivmoddi4 \ - umoddi3 - -CCKEXT_ARM_FUNCTIONS := $(CCKEXT_COMMON_FUNCTIONS) \ - adddf3 \ - addsf3 \ - aeabi_cdcmpeq \ - aeabi_cdrcmple \ - aeabi_cfcmpeq \ - aeabi_cfrcmple \ - aeabi_dcmpeq \ - aeabi_dcmpge \ - aeabi_dcmpgt \ - aeabi_dcmple \ - aeabi_dcmplt \ - aeabi_drsub \ - aeabi_fcmpeq \ - aeabi_fcmpge \ - aeabi_fcmpgt \ - aeabi_fcmple \ - aeabi_fcmplt \ - aeabi_frsub \ - aeabi_idivmod \ - aeabi_uidivmod \ - cmpdf2 \ - cmpsf2 \ - div0 \ - divdf3 \ - divsf3 \ - divsi3 \ - extendsfdf2 \ - ffssi2 \ - fixdfsi \ - fixsfsi \ - floatsidf \ - floatsisf \ - floatunsidf \ - floatunsisf \ - comparedf2 \ - comparesf2 \ - modsi3 \ - muldf3 \ - mulsf3 \ - mulodi4 \ - negdf2 \ - negsf2 \ - subdf3 \ - subsf3 \ - switch16 \ - switch32 \ - switch8 \ - switchu8 \ - truncdfsf2 \ - udivsi3 \ - umodsi3 \ - unorddf2 \ - unordsf2 - -CCKEXT_ARMVFP_FUNCTIONS := $(CCKEXT_ARM_FUNCTIONS) \ - adddf3vfp \ - addsf3vfp \ - divdf3vfp \ - divsf3vfp \ - eqdf2vfp \ - eqsf2vfp \ - extendsfdf2vfp \ - fixdfsivfp \ - fixsfsivfp \ - fixunsdfsivfp \ - fixunssfsivfp \ - floatsidfvfp \ - floatsisfvfp \ - floatunssidfvfp \ - floatunssisfvfp \ - gedf2vfp \ - gesf2vfp \ - gtdf2vfp \ - gtsf2vfp \ - ledf2vfp \ - lesf2vfp \ - ltdf2vfp \ - ltsf2vfp \ - muldf3vfp \ - mulsf3vfp \ - nedf2vfp \ - nesf2vfp \ - subdf3vfp \ - subsf3vfp \ - truncdfsf2vfp \ - unorddf2vfp \ - unordsf2vfp - -CCKEXT_ARM64_FUNCTIONS := \ - $(CCKEXT_PROFILE_FUNCTIONS) \ - divdc3 \ - divsc3 \ - muldc3 \ - mulsc3 \ - udivti3 \ - umodti3 - -FUNCTIONS.cc_kext_ios.armv7 := $(CCKEXT_ARMVFP_FUNCTIONS) -FUNCTIONS.cc_kext_ios.armv7k := $(CCKEXT_ARMVFP_FUNCTIONS) -FUNCTIONS.cc_kext_ios.armv7s := $(CCKEXT_ARMVFP_FUNCTIONS) -FUNCTIONS.cc_kext_ios.arm64 := $(CCKEXT_ARM64_FUNCTIONS) - -CCKEXT_X86_FUNCTIONS := $(CCKEXT_COMMON_FUNCTIONS) \ - divxc3 \ - fixunsxfdi \ - fixunsxfsi \ - fixxfdi \ - floatdixf \ - floatundixf \ - mulxc3 \ - powixf2 - -FUNCTIONS.cc_kext.i386 := $(CCKEXT_X86_FUNCTIONS) \ - ffssi2 \ - i686.get_pc_thunk.eax \ - i686.get_pc_thunk.ebp \ - i686.get_pc_thunk.ebx \ - i686.get_pc_thunk.ecx \ - i686.get_pc_thunk.edi \ - i686.get_pc_thunk.edx \ - i686.get_pc_thunk.esi - -FUNCTIONS.cc_kext.x86_64 := $(CCKEXT_X86_FUNCTIONS) \ - absvti2 \ - addvti3 \ - ashlti3 \ - ashrti3 \ - clzti2 \ - cmpti2 \ - ctzti2 \ - divti3 \ - ffsti2 \ - fixdfti \ - fixsfti \ - fixunsdfti \ - fixunssfti \ - fixunsxfti \ - fixxfti \ - floattidf \ - floattisf \ - floattixf \ - floatuntidf \ - floatuntisf \ - floatuntixf \ - lshrti3 \ - modti3 \ - multi3 \ - mulvti3 \ - negti2 \ - negvti2 \ - parityti2 \ - popcountti2 \ - subvti3 \ - ucmpti2 \ - udivmodti4 \ - udivti3 \ - umodti3 - -FUNCTIONS.cc_kext.x86_64h := $(FUNCTIONS.cc_kext.x86_64) - -# FIXME: Currently, compiler-rt is missing implementations for a number of the -# functions that need to go into libcc_kext.a. Filter them out for now. -CCKEXT_MISSING_FUNCTIONS := \ - cmpdf2 cmpsf2 div0 \ - ffssi2 \ - udiv_w_sdiv unorddf2 unordsf2 bswapdi2 \ - bswapsi2 \ - gcc_bcmp \ - do_global_dtors \ - i686.get_pc_thunk.eax i686.get_pc_thunk.ebp i686.get_pc_thunk.ebx \ - i686.get_pc_thunk.ecx i686.get_pc_thunk.edi i686.get_pc_thunk.edx \ - i686.get_pc_thunk.esi \ - aeabi_cdcmpeq aeabi_cdrcmple aeabi_cfcmpeq aeabi_cfrcmple aeabi_dcmpeq \ - aeabi_dcmpge aeabi_dcmpgt aeabi_dcmple aeabi_dcmplt aeabi_drsub aeabi_fcmpeq \ - aeabi_fcmpge aeabi_fcmpgt aeabi_fcmple aeabi_fcmplt aeabi_frsub aeabi_idivmod \ - aeabi_uidivmod - -FUNCTIONS.cc_kext_ios.armv7 := \ - $(filter-out $(CCKEXT_MISSING_FUNCTIONS),$(FUNCTIONS.cc_kext_ios.armv7)) -FUNCTIONS.cc_kext_ios.armv7k := \ - $(filter-out $(CCKEXT_MISSING_FUNCTIONS),$(FUNCTIONS.cc_kext_ios.armv7k)) -FUNCTIONS.cc_kext_ios.armv7s := \ - $(filter-out $(CCKEXT_MISSING_FUNCTIONS),$(FUNCTIONS.cc_kext_ios.armv7s)) -FUNCTIONS.cc_kext_ios.arm64 := \ - $(filter-out $(CCKEXT_MISSING_FUNCTIONS),$(FUNCTIONS.cc_kext_ios.arm64)) -FUNCTIONS.cc_kext.i386 := \ - $(filter-out $(CCKEXT_MISSING_FUNCTIONS),$(FUNCTIONS.cc_kext.i386)) -FUNCTIONS.cc_kext.x86_64 := \ - $(filter-out $(CCKEXT_MISSING_FUNCTIONS),$(FUNCTIONS.cc_kext.x86_64)) -FUNCTIONS.cc_kext.x86_64h := \ - $(filter-out $(CCKEXT_MISSING_FUNCTIONS),$(FUNCTIONS.cc_kext.x86_64h)) - -KERNEL_USE.cc_kext := 1 -KERNEL_USE.cc_kext_ios := 1 - -VISIBILITY_HIDDEN := 1 - -SHARED_LIBRARY_SUFFIX := dylib diff --git a/make/platform/clang_darwin_test_input.c b/make/platform/clang_darwin_test_input.c deleted file mode 100644 index b406a28a63..0000000000 --- a/make/platform/clang_darwin_test_input.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Include the headers we use in int_lib.h, to verify that they work. */ - -#include -#include -#include -#include -#include - -// Force us to link at least one symbol in a system library -// to detect systems where we don't have those for a given -// architecture. -int main(int argc, const char **argv) { - int x; - memcpy(&x,&argc,sizeof(int)); -} diff --git a/make/platform/clang_linux.mk b/make/platform/clang_linux.mk deleted file mode 100644 index 534b04f169..0000000000 --- a/make/platform/clang_linux.mk +++ /dev/null @@ -1,90 +0,0 @@ -Description := Static runtime libraries for clang/Linux. - -### - -CC := clang -Arch := unknown -Configs := - -# We don't currently have any general purpose way to target architectures other -# than the compiler defaults (because there is no generalized way to invoke -# cross compilers). For now, we just find the target architecture of the -# compiler and only define configurations we know that compiler can generate. -CompilerTargetTriple := $(shell \ - LANG=C $(CC) -v 2>&1 | grep 'Target:' | cut -d' ' -f2) -ifeq ($(CompilerTargetTriple),) -$(error "unable to infer compiler target triple for $(CC)") -endif - -# Only define configs if we detected a linux target. -ifneq ($(findstring -linux-,$(CompilerTargetTriple)),) - -# Define configs only if arch in triple is i386 or x86_64 -CompilerTargetArch := $(firstword $(subst -, ,$(CompilerTargetTriple))) -ifeq ($(call contains,i386 x86_64,$(CompilerTargetArch)),true) - -# TryCompile compiler source flags -# Returns exit code of running a compiler invocation. -TryCompile = \ - $(shell \ - cflags=""; \ - for flag in $(3); do \ - cflags="$$cflags $$flag"; \ - done; \ - $(1) $$cflags $(2) -o /dev/null > /dev/null 2> /dev/null ; \ - echo $$?) - -test_source = $(ProjSrcRoot)/make/platform/clang_linux_test_input.c -ifeq ($(CompilerTargetArch),i386) - SupportedArches := i386 - ifeq ($(call TryCompile,$(CC),$(test_source),-m64),0) - SupportedArches += x86_64 - endif -else - SupportedArches := x86_64 - ifeq ($(call TryCompile,$(CC),$(test_source),-m32),0) - SupportedArches += i386 - endif -endif - -# Build runtime libraries for i386. -ifeq ($(call contains,$(SupportedArches),i386),true) -Configs += builtins-i386 profile-i386 -Arch.builtins-i386 := i386 -Arch.profile-i386 := i386 -endif - -# Build runtime libraries for x86_64. -ifeq ($(call contains,$(SupportedArches),x86_64),true) -Configs += builtins-x86_64 profile-x86_64 -Arch.builtins-x86_64 := x86_64 -Arch.profile-x86_64 := x86_64 -endif - -endif - -endif - -### - -CFLAGS := -fPIC -Wall -Werror -O3 -fomit-frame-pointer - -CFLAGS.builtins-i386 := $(CFLAGS) -m32 -CFLAGS.builtins-x86_64 := $(CFLAGS) -m64 -CFLAGS.profile-i386 := $(CFLAGS) -m32 -CFLAGS.profile-x86_64 := $(CFLAGS) -m64 - -FUNCTIONS.builtins-i386 := $(CommonFunctions) $(ArchFunctions.i386) -FUNCTIONS.builtins-x86_64 := $(CommonFunctions) $(ArchFunctions.x86_64) -FUNCTIONS.profile-i386 := GCDAProfiling InstrProfiling InstrProfilingBuffer \ - InstrProfilingFile InstrProfilingPlatformOther \ - InstrProfilingRuntime InstrProfilingUtil -FUNCTIONS.profile-x86_64 := $(FUNCTIONS.profile-i386) - -# Always use optimized variants. -OPTIMIZED := 1 - -# We don't need to use visibility hidden on Linux. -VISIBILITY_HIDDEN := 0 - -SHARED_LIBRARY_SUFFIX := so diff --git a/make/platform/clang_linux_test_input.c b/make/platform/clang_linux_test_input.c deleted file mode 100644 index e65ce9860a..0000000000 --- a/make/platform/clang_linux_test_input.c +++ /dev/null @@ -1,4 +0,0 @@ -// This file is used to check if we can produce working executables -// for i386 and x86_64 archs on Linux. -#include -int main(){} diff --git a/make/platform/clang_macho_embedded.mk b/make/platform/clang_macho_embedded.mk deleted file mode 100644 index d7870d491f..0000000000 --- a/make/platform/clang_macho_embedded.mk +++ /dev/null @@ -1,297 +0,0 @@ -# These are the functions which clang needs when it is targeting a previous -# version of the OS. The issue is that the backend may use functions which were -# not present in the libgcc that shipped on the platform. In such cases, we link -# with a version of the library which contains private_extern definitions of all -# the extra functions which might be referenced. - -Description := Static runtime libraries for embedded clang/Darwin - -# A function that ensures we don't try to build for architectures that we -# don't have working toolchains for. -CheckArches = \ - $(shell \ - result=""; \ - for arch in $(1); do \ - if $(CC) -arch $$arch -c \ - -integrated-as \ - $(ProjSrcRoot)/make/platform/clang_macho_embedded_test_input.c \ - -o /dev/null > /dev/null 2> /dev/null; then \ - result="$$result$$arch "; \ - else \ - printf 1>&2 \ - "warning: clang_macho_embedded.mk: dropping arch '$$arch' from lib '$(2)'\n"; \ - fi; \ - done; \ - echo $$result) - -XCRun = \ - $(shell \ - result=`xcrun -find $(1) 2> /dev/null`; \ - if [ "$$?" != "0" ]; then result=$(1); fi; \ - echo $$result) - -### - -CC := $(call XCRun,clang) -AR := $(call XCRun,ar) -RANLIB := $(call XCRun,ranlib) -STRIP := $(call XCRun,strip) -LIPO := $(call XCRun,lipo) -DSYMUTIL := $(call XCRun,dsymutil) - -Configs := -UniversalArchs := - -# Soft-float version of the runtime. No floating-point instructions will be used -# and the ABI (out of necessity) passes floating values in normal registers: -# non-VFP variant of the AAPCS. -UniversalArchs.soft_static := $(call CheckArches,armv6m armv7m armv7em armv7,soft_static) -Configs += $(if $(UniversalArchs.soft_static),soft_static) - -# Hard-float version of the runtime. On ARM VFP instructions and registers are -# allowed, and floating point values get passed in them. VFP variant of the -# AAPCS. -UniversalArchs.hard_static := $(call CheckArches,armv7em armv7 i386 x86_64,hard_static) -Configs += $(if $(UniversalArchs.hard_static),hard_static) - -UniversalArchs.soft_pic := $(call CheckArches,armv6m armv7m armv7em armv7,soft_pic) -Configs += $(if $(UniversalArchs.soft_pic),soft_pic) - -UniversalArchs.hard_pic := $(call CheckArches,armv7em armv7 i386 x86_64,hard_pic) -Configs += $(if $(UniversalArchs.hard_pic),hard_pic) - -CFLAGS := -Wall -Werror -Oz -fomit-frame-pointer -ffreestanding - -PIC_CFLAGS := -fPIC -STATIC_CFLAGS := -static - -CFLAGS_SOFT := -mfloat-abi=soft -CFLAGS_HARD := -mfloat-abi=hard - -CFLAGS_ARMV7 := -target thumbv7-apple-darwin-eabi -CFLAGS_I386 := -march=pentium - -CFLAGS.soft_static := $(CFLAGS) $(STATIC_CFLAGS) $(CFLAGS_SOFT) -CFLAGS.hard_static := $(CFLAGS) $(STATIC_CFLAGS) $(CFLAGS_HARD) -CFLAGS.soft_pic := $(CFLAGS) $(PIC_CFLAGS) $(CFLAGS_SOFT) -CFLAGS.hard_pic := $(CFLAGS) $(PIC_CFLAGS) $(CFLAGS_HARD) - -CFLAGS.soft_static.armv7 := $(CFLAGS.soft_static) $(CFLAGS_ARMV7) -CFLAGS.hard_static.armv7 := $(CFLAGS.hard_static) $(CFLAGS_ARMV7) -CFLAGS.soft_pic.armv7 := $(CFLAGS.soft_pic) $(CFLAGS_ARMV7) -CFLAGS.hard_pic.armv7 := $(CFLAGS.hard_pic) $(CFLAGS_ARMV7) - -# x86 platforms ignore -mfloat-abi options and complain about doing so. Despite -# this they're hard-float. -CFLAGS.hard_static.i386 := $(CFLAGS) $(STATIC_CFLAGS) $(CFLAGS_I386) -CFLAGS.hard_pic.i386 := $(CFLAGS) $(PIC_CFLAGS) $(CFLAGS_I386) -CFLAGS.hard_static.x86_64 := $(CFLAGS) $(STATIC_CFLAGS) -CFLAGS.hard_pic.x86_64 := $(CFLAGS) $(PIC_CFLAGS) - -# Functions not wanted: -# + eprintf is obsolete anyway -# + *vfp: designed for Thumb1 CPUs with VFPv2 - -COMMON_FUNCTIONS := \ - absvdi2 \ - absvsi2 \ - addvdi3 \ - addvsi3 \ - ashldi3 \ - ashrdi3 \ - bswapdi2 \ - bswapsi2 \ - clzdi2 \ - clzsi2 \ - cmpdi2 \ - ctzdi2 \ - ctzsi2 \ - divdc3 \ - divdi3 \ - divsc3 \ - divmodsi4 \ - udivmodsi4 \ - do_global_dtors \ - ffsdi2 \ - fixdfdi \ - fixsfdi \ - fixunsdfdi \ - fixunsdfsi \ - fixunssfdi \ - fixunssfsi \ - floatdidf \ - floatdisf \ - floatundidf \ - floatundisf \ - gcc_bcmp \ - lshrdi3 \ - moddi3 \ - muldc3 \ - muldi3 \ - mulsc3 \ - mulvdi3 \ - mulvsi3 \ - negdi2 \ - negvdi2 \ - negvsi2 \ - paritydi2 \ - paritysi2 \ - popcountdi2 \ - popcountsi2 \ - powidf2 \ - powisf2 \ - subvdi3 \ - subvsi3 \ - ucmpdi2 \ - udiv_w_sdiv \ - udivdi3 \ - udivmoddi4 \ - umoddi3 \ - adddf3 \ - addsf3 \ - cmpdf2 \ - cmpsf2 \ - div0 \ - divdf3 \ - divsf3 \ - divsi3 \ - extendsfdf2 \ - extendhfsf2 \ - ffssi2 \ - fixdfsi \ - fixsfsi \ - floatsidf \ - floatsisf \ - floatunsidf \ - floatunsisf \ - comparedf2 \ - comparesf2 \ - modsi3 \ - muldf3 \ - mulsf3 \ - negdf2 \ - negsf2 \ - subdf3 \ - subsf3 \ - truncdfhf2 \ - truncdfsf2 \ - truncsfhf2 \ - udivsi3 \ - umodsi3 \ - unorddf2 \ - unordsf2 \ - atomic_flag_clear \ - atomic_flag_clear_explicit \ - atomic_flag_test_and_set \ - atomic_flag_test_and_set_explicit \ - atomic_signal_fence \ - atomic_thread_fence - -ARM_FUNCTIONS := \ - aeabi_cdcmpeq \ - aeabi_cdrcmple \ - aeabi_cfcmpeq \ - aeabi_cfrcmple \ - aeabi_dcmpeq \ - aeabi_dcmpge \ - aeabi_dcmpgt \ - aeabi_dcmple \ - aeabi_dcmplt \ - aeabi_drsub \ - aeabi_fcmpeq \ - aeabi_fcmpge \ - aeabi_fcmpgt \ - aeabi_fcmple \ - aeabi_fcmplt \ - aeabi_frsub \ - aeabi_idivmod \ - aeabi_uidivmod \ - -# ARM Assembly implementation which requires Thumb2 (i.e. won't work on v6M). -THUMB2_FUNCTIONS := \ - switch16 \ - switch32 \ - switch8 \ - switchu8 \ - sync_fetch_and_add_4 \ - sync_fetch_and_sub_4 \ - sync_fetch_and_and_4 \ - sync_fetch_and_or_4 \ - sync_fetch_and_xor_4 \ - sync_fetch_and_nand_4 \ - sync_fetch_and_max_4 \ - sync_fetch_and_umax_4 \ - sync_fetch_and_min_4 \ - sync_fetch_and_umin_4 \ - sync_fetch_and_add_8 \ - sync_fetch_and_sub_8 \ - sync_fetch_and_and_8 \ - sync_fetch_and_or_8 \ - sync_fetch_and_xor_8 \ - sync_fetch_and_nand_8 \ - sync_fetch_and_max_8 \ - sync_fetch_and_umax_8 \ - sync_fetch_and_min_8 \ - sync_fetch_and_umin_8 - -I386_FUNCTIONS := \ - i686.get_pc_thunk.eax \ - i686.get_pc_thunk.ebp \ - i686.get_pc_thunk.ebx \ - i686.get_pc_thunk.ecx \ - i686.get_pc_thunk.edi \ - i686.get_pc_thunk.edx \ - i686.get_pc_thunk.esi - -# FIXME: Currently, compiler-rt is missing implementations for a number of the -# functions. Filter them out for now. -MISSING_FUNCTIONS := \ - cmpdf2 cmpsf2 div0 \ - ffssi2 \ - udiv_w_sdiv unorddf2 unordsf2 bswapdi2 \ - bswapsi2 \ - gcc_bcmp \ - do_global_dtors \ - i686.get_pc_thunk.eax i686.get_pc_thunk.ebp i686.get_pc_thunk.ebx \ - i686.get_pc_thunk.ecx i686.get_pc_thunk.edi i686.get_pc_thunk.edx \ - i686.get_pc_thunk.esi \ - aeabi_cdcmpeq aeabi_cdrcmple aeabi_cfcmpeq aeabi_cfrcmple aeabi_dcmpeq \ - aeabi_dcmpge aeabi_dcmpgt aeabi_dcmple aeabi_dcmplt aeabi_drsub \ - aeabi_fcmpeq \ aeabi_fcmpge aeabi_fcmpgt aeabi_fcmple aeabi_fcmplt \ - aeabi_frsub aeabi_idivmod aeabi_uidivmod - -FUNCTIONS_ARMV6M := $(COMMON_FUNCTIONS) $(ARM_FUNCTIONS) -FUNCTIONS_ARM_ALL := $(COMMON_FUNCTIONS) $(ARM_FUNCTIONS) $(THUMB2_FUNCTIONS) -FUNCTIONS_I386 := $(COMMON_FUNCTIONS) $(I386_FUNCTIONS) -FUNCTIONS_X86_64 := $(COMMON_FUNCTIONS) - -FUNCTIONS_ARMV6M := \ - $(filter-out $(MISSING_FUNCTIONS),$(FUNCTIONS_ARMV6M)) -FUNCTIONS_ARM_ALL := \ - $(filter-out $(MISSING_FUNCTIONS),$(FUNCTIONS_ARM_ALL)) -FUNCTIONS_I386 := \ - $(filter-out $(MISSING_FUNCTIONS),$(FUNCTIONS_I386)) -FUNCTIONS_X86_64 := \ - $(filter-out $(MISSING_FUNCTIONS),$(FUNCTIONS_X86_64)) - -FUNCTIONS.soft_static.armv6m := $(FUNCTIONS_ARMV6M) -FUNCTIONS.soft_pic.armv6m := $(FUNCTIONS_ARMV6M) - -FUNCTIONS.soft_static.armv7m := $(FUNCTIONS_ARM_ALL) -FUNCTIONS.soft_pic.armv7m := $(FUNCTIONS_ARM_ALL) - -FUNCTIONS.soft_static.armv7em := $(FUNCTIONS_ARM_ALL) -FUNCTIONS.hard_static.armv7em := $(FUNCTIONS_ARM_ALL) -FUNCTIONS.soft_pic.armv7em := $(FUNCTIONS_ARM_ALL) -FUNCTIONS.hard_pic.armv7em := $(FUNCTIONS_ARM_ALL) - -FUNCTIONS.soft_static.armv7 := $(FUNCTIONS_ARM_ALL) -FUNCTIONS.hard_static.armv7 := $(FUNCTIONS_ARM_ALL) -FUNCTIONS.soft_pic.armv7 := $(FUNCTIONS_ARM_ALL) -FUNCTIONS.hard_pic.armv7 := $(FUNCTIONS_ARM_ALL) - -FUNCTIONS.hard_static.i386 := $(FUNCTIONS_I386) -FUNCTIONS.hard_pic.i386 := $(FUNCTIONS_I386) - -FUNCTIONS.hard_static.x86_64 := $(FUNCTIONS_X86_64) -FUNCTIONS.hard_pic.x86_64 := $(FUNCTIONS_X86_64) diff --git a/make/platform/clang_macho_embedded_test_input.c b/make/platform/clang_macho_embedded_test_input.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/make/platform/darwin_bni.mk b/make/platform/darwin_bni.mk deleted file mode 100644 index 56e3ba5730..0000000000 --- a/make/platform/darwin_bni.mk +++ /dev/null @@ -1,135 +0,0 @@ - -Description := Target for Darwin using an Apple-style build. - -Configs := Debug Release Profile Static - -# 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) - -ifneq (,$(SDKROOT)) - 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),) - DEPLOYMENT_FLAGS := -miphoneos-version-min=$(IPHONEOS_DEPLOYMENT_TARGET) -else - ifneq ($(MACOSX_DEPLOYMENT_TARGET),) - DEPLOYMENT_FLAGS := -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET) - endif -endif - -ifneq (,$(SDKROOT)) - DEPLOYMENT_FLAGS += -isysroot $(SDKROOT) -endif - -CFLAGS := -fPIC -Wall -Os -fomit-frame-pointer -g $(DEPLOYMENT_FLAGS) -CFLAGS.Static := $(CFLAGS) -static -DYLIB_FLAGS := $(DEPLOYMENT_FLAGS) \ - -Xarch_arm -Wl,-alias_list,$(SRCROOT)/lib/builtins/arm/softfloat-alias.list - -VISIBILITY_HIDDEN := 0 -VISIBILITY_HIDDEN.Static := 1 - - -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 mulosi4 \ - mulodi4 muloti4 mulsc3 mulvdi3 mulvsi3 negdi2 negvdi2 negvsi2 \ - paritydi2 paritysi2 popcountdi2 popcountsi2 powidf2 \ - powisf2 subvdi3 subvsi3 ucmpdi2 udivdi3 \ - udivmoddi4 umoddi3 apple_versioning eprintf atomic \ - atomic_flag_clear atomic_flag_clear_explicit \ - atomic_flag_test_and_set atomic_flag_test_and_set_explicit \ - atomic_signal_fence atomic_thread_fence \ - extendhfsf2 truncdfhf2 truncsfhf2 - -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 \ - muloti4 mulvti3 mulxc3 negti2 negvti2 parityti2 \ - popcountti2 powixf2 subvti3 ucmpti2 udivmodti4 \ - udivti3 umodti3 clear_cache enable_execute_stack - -FUNCTIONS.armv4t := $(FUNCTIONS) - -FUNCTIONS.armv5 := $(FUNCTIONS) \ - adddf3 addsf3 bswapdi2 bswapsi2 \ - comparedf2 comparesf2 extendsfdf2 \ - divdf3 divsf3 \ - fixdfsi fixsfsi fixunsdfsi fixunssfsi \ - floatsidf floatsisf floatunsidf floatunsisf \ - muldf3 mulsf3 \ - negdf2 negsf2 \ - truncdfsf2 \ - modsi3 umodsi3 udivsi3 divsi3 udivmodsi4 divmodsi4 \ - switch8 switchu8 switch16 switch32 \ - sync_synchronize - -FUNCTIONS.armv6 := $(FUNCTIONS) \ - comparedf2 comparesf2 \ - 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 nesf2vfp \ - subdf3vfp subsf3vfp truncdfsf2vfp unorddf2vfp unordsf2vfp \ - modsi3 umodsi3 udivsi3 divsi3 udivmodsi4 divmodsi4 \ - switch8 switchu8 switch16 switch32 \ - restore_vfp_d8_d15_regs save_vfp_d8_d15_regs \ - sync_synchronize - -FUNCTIONS.armv7 := $(FUNCTIONS) \ - comparedf2 comparesf2 \ - 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 nesf2vfp \ - subdf3vfp subsf3vfp truncdfsf2vfp unorddf2vfp unordsf2vfp \ - modsi3 umodsi3 udivsi3 divsi3 udivmodsi4 divmodsi4 - -FUNCTIONS.armv7s := $(FUNCTIONS.armv7) - -FUNCTIONS.arm64 := divti3 modti3 \ - udivmodti4 \ - udivti3 umodti3 \ - mulsc3 muldc3 \ - powisf2 powidf2 \ - clzti2 \ - fixdfti fixsfti \ - fixunsdfti fixunssfti fixunssfti \ - floattidf floattisf floatuntidf floatuntisf \ - gcc_personality_v0 atomic \ - atomic_flag_clear atomic_flag_clear_explicit \ - atomic_flag_test_and_set \ - atomic_flag_test_and_set_explicit \ - atomic_signal_fence atomic_thread_fence diff --git a/make/platform/multi_arch.mk b/make/platform/multi_arch.mk deleted file mode 100644 index fe6ac4be0e..0000000000 --- a/make/platform/multi_arch.mk +++ /dev/null @@ -1,15 +0,0 @@ -Description := Example configuration for build two libraries for separate \ -architectures. - -Configs := m32 m64 -Arch := i386 -Arch.m64 := x86_64 - -CC := clang - -CFLAGS := -Wall -Werror -CFLAGS.m32 := $(CFLAGS) -m32 -O3 -CFLAGS.m64 := $(CFLAGS) -m64 -O3 - -FUNCTIONS := moddi3 floatundixf udivdi3 -FUNCTIONS.m64 := $(FUNCTIONS) lshrdi3 From a4f8e8ccacf990afebfb97e9e7a462a8b5e4f297 Mon Sep 17 00:00:00 2001 From: angelsl Date: Wed, 28 Oct 2015 15:20:06 +0800 Subject: [PATCH 2/4] Rust: Fix clear_cache on MIPS --- lib/builtins/clear_cache.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/builtins/clear_cache.c b/lib/builtins/clear_cache.c index 863eb818fc..5e3fcccd23 100644 --- a/lib/builtins/clear_cache.c +++ b/lib/builtins/clear_cache.c @@ -24,9 +24,13 @@ #endif #if defined(__mips__) + #include + // Rust: For some strange reason __USE_MISC isn't being defined so + // we don't get the definition of syscall. Force it to be defined. + #define __USE_MISC + #include #include #include - #include #if defined(__ANDROID__) && defined(__LP64__) /* * clear_mips_cache - Invalidates instruction cache for Mips. From 4ed12bd3714423a64a9e943943caf35031bada76 Mon Sep 17 00:00:00 2001 From: angelsl Date: Wed, 28 Oct 2015 15:20:31 +0800 Subject: [PATCH 3/4] Rust: Add back endianness check via Linux endian.h for old GCC on MIPS --- lib/builtins/int_endianness.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/builtins/int_endianness.h b/lib/builtins/int_endianness.h index 7995ddbb95..92511e6a15 100644 --- a/lib/builtins/int_endianness.h +++ b/lib/builtins/int_endianness.h @@ -105,6 +105,19 @@ #endif /* Windows */ +#if defined(__linux__) +#include + +#if __BYTE_ORDER == __BIG_ENDIAN +#define _YUGA_LITTLE_ENDIAN 0 +#define _YUGA_BIG_ENDIAN 1 +#elif __BYTE_ORDER == __LITTLE_ENDIAN +#define _YUGA_LITTLE_ENDIAN 1 +#define _YUGA_BIG_ENDIAN 0 +#endif /* __BYTE_ORDER */ + +#endif /* GNU/Linux */ + #endif /* Clang or GCC. */ /* . */ From 96626ab9c1242b42a60df9b3cd9a0dc8920b5ea6 Mon Sep 17 00:00:00 2001 From: angelsl Date: Wed, 28 Oct 2015 15:21:02 +0800 Subject: [PATCH 4/4] Rust: Disable emutls on MIPS; old GCC can't take it --- make/platform/triple.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/make/platform/triple.mk b/make/platform/triple.mk index 061faa7f96..7e3450e395 100644 --- a/make/platform/triple.mk +++ b/make/platform/triple.mk @@ -54,6 +54,12 @@ ifeq ($(TargetTriple),arm-linux-androideabi) sync_fetch_and_umin_8 endif +# Disable emutls on MIPS +# Rust uses GCC 4.4 to cross-compile, which doesn't have some builtins +ifneq (,$(findstring mips,$(TargetTriple))) + CommonDisabledFunctions := emutls +endif + # Clear cache is builtin on aarch64-apple-ios # arm64 and aarch64 are synonims, but iOS targets usually use arm64 (history reasons) ifeq (aarch64-apple-ios,$(subst arm64,aarch64,$(TargetTriple)))