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]

Correct CPP_PREDEFINES for MIPS/Linux



CPP_PREDEFINES isn't set in mips/linux.h and therefore misses at least
"-Dlinux".  I'm appending a patch which defines CPP_PREDEFINES to
those values which are AFAIK at least needed.  I might have missed
some.

Andreas

1999-08-22  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* config/mips/linux.h (CPP_PREDEFINES): Define for little and big
	endian machines.

--- linux.h.~1~	Sat Aug 21 11:56:20 1999
+++ linux.h	Sun Aug 22 10:41:11 1999
@@ -72,6 +72,15 @@
         %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
         %{static:-static}}}"
 
+/* Specify predefined symbols in preprocessor.  */
+#undef CPP_PREDEFINES
+#if TARGET_ENDIAN_DEFAULT == 0
+# define CPP_PREDEFINES "\
+-Dunix -Dmips -DR3000 -DMIPSEL -Dlinux -Asystem(posix) -Acpu(mips) -Amachine(mips)"
+#else
+# define CPP_PREDEFINES "\
+-Dunix -Dmips -DR3000 -DMIPSEB -Dlinux -Asystem(posix) -Acpu(mips) -Amachine(mips)"
+#endif
 
 #undef SUBTARGET_ASM_SPEC
 #define SUBTARGET_ASM_SPEC "-KPIC"

-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de


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