summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortsutsui <tsutsui@NetBSD.org>2000-02-16 11:23:48 +0000
committertsutsui <tsutsui@NetBSD.org>2000-02-16 11:23:48 +0000
commit9658fcaa619dbbdce7bcefd5bb28d3cd2f2880d2 (patch)
treeedf0f0555b3fa37be0859e2f10e253e71d2d72bf
parentce0bacce6a04d2c1c140f4a1060fa6cba5586546 (diff)
Add support of mipseb target.
-rw-r--r--gnu/dist/gcc/config/mips/netbsd.h9
-rw-r--r--gnu/usr.bin/egcs/Makefile.inc3
-rw-r--r--gnu/usr.bin/egcs/arch/mips/tm.h10
3 files changed, 20 insertions, 2 deletions
diff --git a/gnu/dist/gcc/config/mips/netbsd.h b/gnu/dist/gcc/config/mips/netbsd.h
index 72577d3fb2b..a2d1e346bd2 100644
--- a/gnu/dist/gcc/config/mips/netbsd.h
+++ b/gnu/dist/gcc/config/mips/netbsd.h
@@ -20,7 +20,9 @@ Boston, MA 02111-1307, USA. */
/* Define default target values. */
+#ifndef TARGET_ENDIAN_DEFAULT
#define TARGET_ENDIAN_DEFAULT 0
+#endif
#define TARGET_DEFAULT MASK_GAS
#ifdef hpcmips /* XXX should use distinct target name -uch */
@@ -45,10 +47,17 @@ Boston, MA 02111-1307, USA. */
/* Define mips-specific netbsd predefines... */
#undef CPP_PREDEFINES
+#if TARGET_ENDIAN_DEFAULT == MASK_BIG_ENDIAN
+#define CPP_PREDEFINES \
+ "-D__ANSI_COMPAT -DMIPSEB -DR3000 -DSYSTYPE_BSD -D_SYSTYPE_BSD \
+ -D__NetBSD__ -D__ELF__ -Dmips -D__NO_LEADING_UNDERSCORES__ -D__GP_SUPPORT__ \
+ -D_R3000 -Asystem(unix) -Asystem(NetBSD) -Amachine(mips)"
+#else
#define CPP_PREDEFINES \
"-D__ANSI_COMPAT -DMIPSEL -DR3000 -DSYSTYPE_BSD -D_SYSTYPE_BSD \
-D__NetBSD__ -D__ELF__ -Dmips -D__NO_LEADING_UNDERSCORES__ -D__GP_SUPPORT__ \
-D_R3000 -Asystem(unix) -Asystem(NetBSD) -Amachine(mips)"
+#endif
/* Always uses gas. */
diff --git a/gnu/usr.bin/egcs/Makefile.inc b/gnu/usr.bin/egcs/Makefile.inc
index 551b31b071b..110480f9b1e 100644
--- a/gnu/usr.bin/egcs/Makefile.inc
+++ b/gnu/usr.bin/egcs/Makefile.inc
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.22 1999/10/09 16:10:19 sommerfeld Exp $
+# $NetBSD: Makefile.inc,v 1.23 2000/02/16 11:23:49 tsutsui Exp $
.if !defined(GCC_MAKEFILE_INC)
GCC_MAKEFILE_INC=1
@@ -23,6 +23,7 @@ COMMONOBJ!= cd ${.CURDIR}/../common; ${MAKE} print-objdir
.if (${MACHINE_ARCH} == "mipsel") || (${MACHINE_ARCH} == "mipseb")
ARCHSUBDIR= mips
+CPPFLAGS+= -D${MACHINE_ARCH}
.else
ARCHSUBDIR= ${MACHINE_ARCH}
.endif
diff --git a/gnu/usr.bin/egcs/arch/mips/tm.h b/gnu/usr.bin/egcs/arch/mips/tm.h
index 5b2c4dde299..5b86d152238 100644
--- a/gnu/usr.bin/egcs/arch/mips/tm.h
+++ b/gnu/usr.bin/egcs/arch/mips/tm.h
@@ -1,3 +1,11 @@
-/* $NetBSD: tm.h,v 1.2 1998/08/17 20:26:07 tv Exp $ */
+/* $NetBSD: tm.h,v 1.3 2000/02/16 11:23:49 tsutsui Exp $ */
+
+#ifdef mipseb
+#define TARGET_ENDIAN_DEFAULT MASK_BIG_ENDIAN
+#else
+#ifdef mipsel
+#define TARGET_ENDIAN_DEFAULT 0
+#endif
+#endif
#include "mips/netbsd.h"