[applied mips patch] fix up STARTFILE_SPEC for default ABI == MEABI

cgd@broadcom.com cgd@broadcom.com
Tue Jul 30 23:28:00 GMT 2002


(pre-approved by Eric, tested on mipsisa32-elf where, uh, tests can
build again.  It's a horrible kludge, but it's the kludge that was
there before and it needs to be there until libgloss consistently uses
STARTUP for mips.  8-)

2002-07-30  Chris Demetriou  <cgd@broadcom.com>

	* config/mips/elf.h (STARTFILE_SPEC): Define differently if
	default ABI is MEABI.  (Undoes incorrect change in Eric Christopher's
	patch on 2002-07-29.)
	* config/mips/elf64.h (STARTFILE_SPEC): Likewise.

Index: config/mips/elf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/elf.h,v
retrieving revision 1.42
diff -u -p -r1.42 elf.h
--- config/mips/elf.h	29 Jul 2002 22:21:41 -0000	1.42
+++ config/mips/elf.h	31 Jul 2002 06:00:23 -0000
@@ -235,7 +235,8 @@ void FN ()                              
 #define LIB_SPEC ""
 
 #undef  STARTFILE_SPEC
-#ifdef HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES
+#if defined(HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES) \
+    || (MIPS_ABI_DEFAULT == ABI_MEABI)
 #define STARTFILE_SPEC "crti%O%s crtbegin%O%s"
 #else
 #define STARTFILE_SPEC "crti%O%s crtbegin%O%s %{!mno-crt0:crt0%O%s}"
Index: config/mips/elf64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/elf64.h,v
retrieving revision 1.49
diff -u -p -r1.49 elf64.h
--- config/mips/elf64.h	29 Jul 2002 22:21:41 -0000	1.49
+++ config/mips/elf64.h	31 Jul 2002 06:00:23 -0000
@@ -193,7 +193,8 @@ void FN ()                              
 #define LIB_SPEC ""
 
 #undef  STARTFILE_SPEC
-#ifdef HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES
+#if defined(HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES) \
+    || (MIPS_ABI_DEFAULT == ABI_MEABI)
 #define STARTFILE_SPEC "crti%O%s crtbegin%O%s"
 #else
 #define STARTFILE_SPEC "crti%O%s crtbegin%O%s %{!mno-crt0:crt0%O%s}"



More information about the Gcc-patches mailing list