Subject: Re: egcs 1.1 on pmax
To: Erik Bertelsen <erik@mediator.uni-c.dk>
From: Tsubai Masanari <tsubai@iri.co.jp>
List: tech-toolchain
Date: 08/20/1998 01:34:10
On newsmips (big-endian mips), it seems to work with the following patch.
libgcc, libobjc, and libg2c are compiled successfully.
*** dist/gcc/config/mips/netbsd.h.orig Mon Aug 17 13:56:56 1998
--- dist/gcc/config/mips/netbsd.h Thu Aug 20 01:12:28 1998
***************
*** 20,32 ****
--- 20,38 ----
/* Define default target values. */
+ #ifdef __MIPSEL__
#define TARGET_ENDIAN_DEFAULT 0
+ #else
+ #define TARGET_ENDIAN_DEFAULT MASK_BIG_ENDIAN
+ #endif
#define TARGET_DEFAULT MASK_GAS
/* Get generic mips ELF definitions. */
#include <mips/elf.h>
+ #undef OBJECT_FORMAT_COFF
+
/* Get generic NetBSD definitions. */
#define NETBSD_ELF
***************
*** 34,44 ****
--- 40,67 ----
/* Define mips-specific netbsd predefines... */
+ #if 1 /* needed? */
+ #undef LOCAL_LABEL_PREFIX
+ #define LOCAL_LABEL_PREFIX "."
+ #endif
+
+ #undef MIPS_DEFAULT_GVALUE
+ #define MIPS_DEFAULT_GVALUE 0
+
+ #define DWARF2_UNWIND_INFO 0
+
#undef CPP_PREDEFINES
+ #ifdef __MIPSEL__
#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__ \
-Dunix -D_R3000 -Asystem(unix) -Asystem(NetBSD) -Amachine(mips)"
+ #else
+ #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__ \
+ -Dunix -D_R3000 -Asystem(unix) -Asystem(NetBSD) -Amachine(mips)"
+ #endif
/* Always uses gas. */
***************
*** 242,244 ****
--- 265,276 ----
/* Since gas and gld are standard on NetBSD, we don't need these */
#undef ASM_FINAL_SPEC
+
+ #define ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL(FILE, SY, HI, LO) \
+ do { \
+ assemble_name (FILE, SY); \
+ fputc ('=', FILE); \
+ assemble_name (FILE, HI); \
+ fputc ('-', FILE); \
+ assemble_name (FILE, LO); \
+ } while (0)