summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/cc
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/usr.bin/cc
parent1a39c79ce0aa29aa14db8a450a4ac4f989d997b5 (diff)
downloadFreeBSD-src-f18a1ee8d409a05ce2da0ed78cc3075560def165.zip
FreeBSD-src-f18a1ee8d409a05ce2da0ed78cc3075560def165.tar.gz
Add FreeBSD/MIPS support to GCC.
Diffstat (limited to 'gnu/usr.bin/cc')
-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
3 files changed, 14 insertions, 1 deletions
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