diff options
author | Andrew Turner <andrew@FreeBSD.org> | 2012-12-18 07:26:55 +0000 |
---|---|---|
committer | Andrew Turner <andrew@FreeBSD.org> | 2012-12-18 07:26:55 +0000 |
commit | e376173cabfc7f5d07edc2a4443dace9a4fb1c18 (patch) | |
tree | b9ccd4f177534c521956c04f5130208d834dec79 /lib/libcompiler_rt | |
parent | c7dada99bbbb0ef96c5842e54387e0cafa350439 (diff) | |
download | src-e376173cabfc7f5d07edc2a4443dace9a4fb1c18.tar.gz src-e376173cabfc7f5d07edc2a4443dace9a4fb1c18.zip |
Get libcompiler-rt and libgcc building on ARM with clang.
* Don't provide clear_cache or the __sync_* functions on ARM with clang as
they are provided by clang as builtin functions.
* Tell clang it is aloud to compile some libgcc code using heinous GCC
extensions.
Notes
Notes:
svn path=/head/; revision=244382
Diffstat (limited to 'lib/libcompiler_rt')
-rw-r--r-- | lib/libcompiler_rt/Makefile | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/libcompiler_rt/Makefile b/lib/libcompiler_rt/Makefile index 84f9b368c137..af1fcb6e7ff7 100644 --- a/lib/libcompiler_rt/Makefile +++ b/lib/libcompiler_rt/Makefile @@ -28,7 +28,6 @@ SRCF= absvdi2 \ ashlti3 \ ashrdi3 \ ashrti3 \ - clear_cache \ clzdi2 \ clzsi2 \ clzti2 \ @@ -126,6 +125,11 @@ SRCF= absvdi2 \ umoddi3 \ umodti3 +# Don't build clear_cache on ARM with clang as it is a builtin there. +.if ${MACHINE_CPUARCH} != "arm" || ${COMPILER_TYPE} != "clang" +SRCF+= clear_cache +.endif + # These are already shipped by libc.a on arm and mips .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" SRCF+= adddf3 \ @@ -148,8 +152,9 @@ SRCF+= adddf3 \ umodsi3 .endif -# FreeBSD-specific atomic intrinsics. -.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips" +# FreeBSD-specific atomic intrinsics. Clang provides them as a builtin. +.if (${MACHINE_CPUARCH} == "arm" && ${COMPILER_TYPE} != "clang") || \ + ${MACHINE_CPUARCH} == "mips" SRCF+= __sync_fetch_and_add_4 \ __sync_fetch_and_and_4 \ __sync_fetch_and_or_4 \ |