summaryrefslogtreecommitdiffstats
path: root/gnu/lib
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2013-01-17 05:56:28 +0000
committerandrew <andrew@FreeBSD.org>2013-01-17 05:56:28 +0000
commit9b858bb6f0adb73473a948583965d4fc128312c8 (patch)
tree24606f697ac98c0b9dab3e26889f40567aa563e5 /gnu/lib
parent9d3b6799014eb32e9bd3bb2e40cc8d39a0cc2968 (diff)
downloadFreeBSD-src-9b858bb6f0adb73473a948583965d4fc128312c8.zip
FreeBSD-src-9b858bb6f0adb73473a948583965d4fc128312c8.tar.gz
Add compiler support for the ARM EABI.
ARM EABI support is disabled by default and can be enabled by setting WITH_ARM_EABI when building, however only the kernel-toolchain target will work with this flag until the rest of the support is added.
Diffstat (limited to 'gnu/lib')
-rw-r--r--gnu/lib/csu/Makefile4
-rw-r--r--gnu/lib/libgcc/Makefile25
-rw-r--r--gnu/lib/libgcov/Makefile5
-rw-r--r--gnu/lib/libstdc++/Makefile10
4 files changed, 35 insertions, 9 deletions
diff --git a/gnu/lib/csu/Makefile b/gnu/lib/csu/Makefile
index a65be66..1efe865 100644
--- a/gnu/lib/csu/Makefile
+++ b/gnu/lib/csu/Makefile
@@ -24,6 +24,10 @@ CFLAGS+= -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. \
CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG}
MKDEP= -DCRT_BEGIN
+.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
+CFLAGS+= -DTARGET_ARM_EABI
+.endif
+
.if ${MACHINE_CPUARCH} == "ia64"
BEGINSRC= crtbegin.asm
ENDSRC= crtend.asm
diff --git a/gnu/lib/libgcc/Makefile b/gnu/lib/libgcc/Makefile
index c07ae87..73d9213 100644
--- a/gnu/lib/libgcc/Makefile
+++ b/gnu/lib/libgcc/Makefile
@@ -15,6 +15,10 @@ MK_SSP= no
.include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt"
+.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
+CFLAGS+= -DTARGET_ARM_EABI
+.endif
+
.if ${TARGET_CPUARCH} == "mips"
LIB= gcc
.endif
@@ -55,10 +59,13 @@ LIB2FUNCS+= _fixuns${mode}si
.endfor
# Likewise double-word routines.
+.if ${TARGET_CPUARCH} != "arm" || ${MK_ARM_EABI} == "no"
+# These are implemented in an ARM specific file but will not be filtered out
.for mode in sf df xf tf
LIB2FUNCS+= _fix${mode}di _fixuns${mode}di
LIB2FUNCS+= _floatdi${mode} _floatundi${mode}
.endfor
+.endif
LIB2ADD = $(LIB2FUNCS_EXTRA)
LIB2ADD_ST = $(LIB2FUNCS_STATIC_EXTRA)
@@ -115,15 +122,14 @@ CFLAGS+= -fheinous-gnu-extensions
LIB1ASMSRC = lib1funcs.asm
LIB1ASMFUNCS = _dvmd_tls _bb_init_func
-LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c
+.if ${MK_ARM_EABI} != "no"
+LIB1ASMFUNCS+= _addsubdf3 _addsubsf3 _cmpdf2 _cmpsf2 _fixdfsi _fixsfsi \
+ _fixunsdfsi _fixunsdfsi _muldivdf3 _muldivsf3 _udivsi3
-# Not now
-#LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func
-#LIB1ASMFUNCS+= _call_via_rX _interwork_call_via_rX \
-# _lshrdi3 _ashrdi3 _ashldi3 \
-# _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
-# _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
-# _fixsfsi _fixunssfsi _floatdidf _floatdisf
+LIB2ADDEH = unwind-arm.c libunwind.S pr-support.c unwind-c.c
+.else
+LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c
+.endif
.endif
.if ${TARGET_CPUARCH} == mips
@@ -329,6 +335,9 @@ CLEANFILES += cs-*.h option*
SHLIB_MKMAP = ${GCCDIR}/mkmap-symver.awk
SHLIB_MKMAP_OPTS =
SHLIB_MAPFILES = ${GCCDIR}/libgcc-std.ver
+.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
+SHLIB_MAPFILES += ${GCCDIR}/config/arm/libgcc-bpabi.ver
+.endif
VERSION_MAP = libgcc.map
libgcc.map: ${SHLIB_MKMAP} ${SHLIB_MAPFILES} ${SOBJS} ${OBJS:R:S/$/.So/}
diff --git a/gnu/lib/libgcov/Makefile b/gnu/lib/libgcov/Makefile
index 680cdbf..dbefca2 100644
--- a/gnu/lib/libgcov/Makefile
+++ b/gnu/lib/libgcov/Makefile
@@ -15,6 +15,11 @@ CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
CFLAGS+= -D_PTHREADS -DGTHREAD_USE_WEAK
CFLAGS+= -I${.CURDIR}/../../usr.bin/cc/cc_tools \
-I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I.
+
+.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
+CFLAGS+= -DTARGET_ARM_EABI
+.endif
+
#
# Library members defined in libgcov.c.
# Defined in libgcov.c, included only in gcov library
diff --git a/gnu/lib/libstdc++/Makefile b/gnu/lib/libstdc++/Makefile
index 1005b5d..da88e70 100644
--- a/gnu/lib/libstdc++/Makefile
+++ b/gnu/lib/libstdc++/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
GCCVER= 4.2
GCCDIR= ${.CURDIR}/../../../contrib/gcc
GCCLIB= ${.CURDIR}/../../../contrib/gcclibs
@@ -14,7 +16,7 @@ LIB= stdc++
SHLIB_MAJOR= 6
CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H
-.if ${MACHINE_CPUARCH} == "arm"
+.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} == "no"
CFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1
.endif
CFLAGS+= -I${.CURDIR} -I${SUPDIR} -I${GCCDIR} -I${SRCDIR}/include
@@ -594,7 +596,13 @@ gthr-default.h: ${GCCDIR}/gthr-posix.h
CLEANFILES+= ${THRHDRS}
+.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
+unwind.h: ${GCCDIR}/config/arm/unwind-arm.h
+.else
unwind.h: ${GCCDIR}/unwind-generic.h
+.endif
+
+unwind.h:
ln -sf ${.ALLSRC} ${.TARGET}
SRCS+= unwind.h
OpenPOWER on IntegriCloud