summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2008-09-01 18:46:03 +0000
committerobrien <obrien@FreeBSD.org>2008-09-01 18:46:03 +0000
commitf18a1ee8d409a05ce2da0ed78cc3075560def165 (patch)
treed4a5d7ba05f3e4eac86517fd9574ef2710df6e58 /gnu
parent1a39c79ce0aa29aa14db8a450a4ac4f989d997b5 (diff)
downloadFreeBSD-src-f18a1ee8d409a05ce2da0ed78cc3075560def165.zip
FreeBSD-src-f18a1ee8d409a05ce2da0ed78cc3075560def165.tar.gz
Add FreeBSD/MIPS support to GCC.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/lib/libgcc/Makefile2
-rw-r--r--gnu/lib/libgomp/Makefile2
-rw-r--r--gnu/lib/libgomp/config.h2
-rw-r--r--gnu/usr.bin/cc/Makefile.tgt3
-rw-r--r--gnu/usr.bin/cc/cc_tools/Makefile3
-rw-r--r--gnu/usr.bin/cc/cc_tools/elfos-undef.h9
6 files changed, 17 insertions, 4 deletions
diff --git a/gnu/lib/libgcc/Makefile b/gnu/lib/libgcc/Makefile
index fa8a26f..5f34f72 100644
--- a/gnu/lib/libgcc/Makefile
+++ b/gnu/lib/libgcc/Makefile
@@ -174,7 +174,7 @@ OBJ_GRPS = STD DIV
# Floating point emulation functions
#
.if ${TARGET_ARCH} == "armNOT_YET" || ${TARGET_ARCH} == "powerpc" || \
- ${TARGET_ARCH} == "sparc64"
+ ${TARGET_ARCH} == "sparc64" || ${TARGET_ARCH} == "mips"
FPBIT_CFLAGS = -DFINE_GRAINED_LIBRARIES -DFLOAT
DPBIT_CFLAGS = -DFINE_GRAINED_LIBRARIES
diff --git a/gnu/lib/libgomp/Makefile b/gnu/lib/libgomp/Makefile
index 17f8b46..b0a7be8 100644
--- a/gnu/lib/libgomp/Makefile
+++ b/gnu/lib/libgomp/Makefile
@@ -24,7 +24,7 @@ VERSION_MAP= ${SRCDIR}/libgomp.map
# Target-specific OpenMP configuration
.if ${MACHINE_ARCH} == arm || ${MACHINE_ARCH} == i386 || \
- ${MACHINE_ARCH} == powerpc
+ ${MACHINE_ARCH} == powerpc || ${MACHINE_ARCH} == mips
OMP_LOCK_ALIGN = 4
OMP_LOCK_KIND= 4
OMP_LOCK_SIZE= 4
diff --git a/gnu/lib/libgomp/config.h b/gnu/lib/libgomp/config.h
index 2616a50..8aecae8 100644
--- a/gnu/lib/libgomp/config.h
+++ b/gnu/lib/libgomp/config.h
@@ -59,7 +59,7 @@
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if the target supports thread-local storage. */
-#if !defined(__sparc64__) && !defined(__arm__)
+#if !defined(__sparc64__) && !defined(__arm__) && !defined(__mips__)
#define HAVE_TLS 1
#endif
diff --git a/gnu/usr.bin/cc/Makefile.tgt b/gnu/usr.bin/cc/Makefile.tgt
index 3cb9678..dc6cc81 100644
--- a/gnu/usr.bin/cc/Makefile.tgt
+++ b/gnu/usr.bin/cc/Makefile.tgt
@@ -15,6 +15,9 @@ GCC_CPU= ${TARGET_ARCH}
.if ${TARGET_ARCH} == "ia64"
TARGET_CPU_DEFAULT= MASK_GNU_AS|MASK_GNU_LD
.endif
+.if ${TARGET_ARCH} == "mips"
+TARGET_CPU_DEFAULT= 16
+.endif
.if ${TARGET_ARCH} == "sparc64"
TARGET_CPU_DEFAULT= TARGET_CPU_ultrasparc
.endif
diff --git a/gnu/usr.bin/cc/cc_tools/Makefile b/gnu/usr.bin/cc/cc_tools/Makefile
index 586878b..f248313 100644
--- a/gnu/usr.bin/cc/cc_tools/Makefile
+++ b/gnu/usr.bin/cc/cc_tools/Makefile
@@ -33,6 +33,7 @@ TARGET_INC+= ${GCC_CPU}/unix.h
TARGET_INC+= ${GCC_CPU}/att.h
.endif
TARGET_INC+= dbxelf.h
+TARGET_INC+= elfos-undef.h
TARGET_INC+= elfos.h
TARGET_INC+= freebsd-native.h
TARGET_INC+= freebsd-spec.h
@@ -45,7 +46,7 @@ TARGET_INC+= ${GCC_CPU}/sysv4.h
.if ${TARGET_ARCH} == "amd64"
TARGET_INC+= ${GCC_CPU}/x86-64.h
.endif
-.if ${TARGET_ARCH} == "arm"
+.if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "mips"
TARGET_INC+= ${GCC_CPU}/elf.h
.endif
.if ${TARGET_ARCH} == "arm"
diff --git a/gnu/usr.bin/cc/cc_tools/elfos-undef.h b/gnu/usr.bin/cc/cc_tools/elfos-undef.h
new file mode 100644
index 0000000..e889865
--- /dev/null
+++ b/gnu/usr.bin/cc/cc_tools/elfos-undef.h
@@ -0,0 +1,9 @@
+/* $FreeBSD$ */
+
+/* This header exists to avoid editing contrib/gcc/config/elfos.h - which
+ isn't coded to be defensive as it should... */
+
+#undef ASM_DECLARE_OBJECT_NAME
+#undef ASM_OUTPUT_IDENT
+#undef IDENT_ASM_OP
+#undef READONLY_DATA_SECTION_ASM_OP
OpenPOWER on IntegriCloud