This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

More MIPS-Linux Tweaks



Here's another fix for MIPS-Linux: It adds CPP_PREDEFINES. I'm also
removing one option from LINK_SPEC which is only needed on sparc
(LINK_SPEC was copied from sparc-linux).

Andreas

P.S. Thanks Gavin for adding my previous patch.

1999-11-24  Andreas Jaeger  <aj@suse.de>

	* config/mips/linux.h (CPP_PREDEFINES): Added.
	(CPP_PREDEFINES_COMMON): Added.
	(LINK_SPEC): Remove -Y since this is only needed on sparc.

============================================================
Index: config/mips/linux.h
--- config/mips/linux.h	1999/11/24 15:19:19	1.7
+++ config/mips/linux.h	1999/11/24 16:08:28
@@ -40,6 +40,18 @@
 #undef DEFAULT_VTABLE_THUNKS
 #define DEFAULT_VTABLE_THUNKS 1
 
+/* Specify predefined symbols in preprocessor.  */
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES_COMMON "\
+-Dunix -Dmips -D_mips -DR3000 -D_R3000 -Dlinux -Asystem(posix) -Acpu(mips) \
+-Amachine(mips) -D__ELF__"
+
+#if TARGET_ENDIAN_DEFAULT == 0
+#define CPP_PREDEFINES "-DMIPSEL -D_MIPSEL" CPP_PREDEFINES_COMMON
+#else
+#define CPP_PREDEFINES "-DMIPSEB -D_MIPSEB" CPP_PREDEFINES_COMMON
+#endif
+
 /* Provide a STARTFILE_SPEC appropriate for GNU/Linux.  Here we add
    the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
    provides part of the support for getting C++ file-scope static
@@ -76,7 +88,7 @@
 
 /* Borrowed from sparc/linux.h */
 #undef LINK_SPEC
-#define LINK_SPEC "-Y P,/usr/lib %{shared:-shared} \
+#define LINK_SPEC "%{shared:-shared} \
   %{!shared: \
     %{!ibcs: \
       %{!static: \

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]