summaryrefslogtreecommitdiffstats
path: root/gnu/lib
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2012-12-18 07:26:55 +0000
committerandrew <andrew@FreeBSD.org>2012-12-18 07:26:55 +0000
commit3a4e3b814af8211f139991b6ab47d3c08a587f80 (patch)
treeb9ccd4f177534c521956c04f5130208d834dec79 /gnu/lib
parentdf821e65093c9e47f6dec2a8d50fa5ba1a6100ce (diff)
downloadFreeBSD-src-3a4e3b814af8211f139991b6ab47d3c08a587f80.zip
FreeBSD-src-3a4e3b814af8211f139991b6ab47d3c08a587f80.tar.gz
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.
Diffstat (limited to 'gnu/lib')
-rw-r--r--gnu/lib/libgcc/Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/gnu/lib/libgcc/Makefile b/gnu/lib/libgcc/Makefile
index 52a0c2d..c07ae87 100644
--- a/gnu/lib/libgcc/Makefile
+++ b/gnu/lib/libgcc/Makefile
@@ -38,13 +38,16 @@ OBJS= # added to below in various ways depending on TARGET_CPUARCH
#
# Library members defined in libgcc2.c.
LIB2FUNCS= _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 \
- _cmpdi2 _ucmpdi2 _clear_cache \
+ _cmpdi2 _ucmpdi2 \
_enable_execute_stack _trampoline __main _absvsi2 _absvdi2 _addvsi3 \
_addvdi3 _subvsi3 _subvdi3 _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 _ctors \
_ffssi2 _ffsdi2 _clz _clzsi2 _clzdi2 _ctzsi2 _ctzdi2 _popcount_tab \
_popcountsi2 _popcountdi2 _paritysi2 _paritydi2 _powisf2 _powidf2 \
_powixf2 _powitf2 _mulsc3 _muldc3 _mulxc3 _multc3 _divsc3 _divdc3 \
_divxc3 _divtc3
+.if ${COMPILER_TYPE} != "clang" || ${TARGET_CPUARCH} != "arm"
+LIB2FUNCS+= _clear_cache
+.endif
# The floating-point conversion routines that involve a single-word integer.
.for mode in sf df xf
@@ -106,6 +109,10 @@ LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4
.if ${TARGET_CPUARCH} == "arm"
# from config/arm/t-strongarm-elf
CFLAGS+= -Dinhibit_libc -fno-inline
+.if ${COMPILER_TYPE} == "clang"
+CFLAGS+= -fheinous-gnu-extensions
+.endif
+
LIB1ASMSRC = lib1funcs.asm
LIB1ASMFUNCS = _dvmd_tls _bb_init_func
LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c
OpenPOWER on IntegriCloud