Patch to fix CPP_PREDEFINES on linux/alpha and linux/x86.

Niels Kristian Bech Jensen nkbj@image.dk
Thu Sep 24 02:48:00 GMT 1998


CPP_PREDEFINES in egcs-1.1b doesn't include architecture specific
information on linux/alpha and linux/x86. This breaks Imake (and maybe
other programs) which depend on /lib/cpp exporting such information.

This patch should fix the problem:
 
diff -urN egcs-1.1b.orig/gcc/config/alpha/linux.h egcs-1.1b/gcc/config/alpha/linux.h
--- egcs-1.1b.orig/gcc/config/alpha/linux.h	Tue Jul 21 00:47:24 1998
+++ egcs-1.1b/gcc/config/alpha/linux.h	Thu Sep 24 10:48:18 1998
@@ -24,7 +24,7 @@
 
 #undef CPP_PREDEFINES
 #define CPP_PREDEFINES \
-"-Dlinux -Dunix -Asystem(linux) -D_LONGLONG " SUB_CPP_PREDEFINES
+"-Dlinux -D__alpha -Dunix -Asystem(unix) -Asystem(posix) -Acpu(alpha) -Amachine(alpha) -D_LONGLONG " SUB_CPP_PREDEFINES
 
 #undef LIB_SPEC
 #define LIB_SPEC "%{pg:-lgmon} %{pg:-lc_p} %{!pg:-lc}"
diff -urN egcs-1.1b.orig/gcc/config/i386/linux-aout.h egcs-1.1b/gcc/config/i386/linux-aout.h
--- egcs-1.1b.orig/gcc/config/i386/linux-aout.h	Tue Jul 14 00:38:40 1998
+++ egcs-1.1b/gcc/config/i386/linux-aout.h	Thu Sep 24 10:49:15 1998
@@ -31,7 +31,7 @@
 /* Specify predefined symbols in preprocessor.  */
 
 #undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dunix -Dlinux -Asystem(posix)"
+#define CPP_PREDEFINES "-Dunix -Di386 -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386)"
 
 #undef CPP_SPEC
 #define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
diff -urN egcs-1.1b.orig/gcc/config/i386/linux-oldld.h egcs-1.1b/gcc/config/i386/linux-oldld.h
--- egcs-1.1b.orig/gcc/config/i386/linux-oldld.h	Tue Jul 14 00:38:42 1998
+++ egcs-1.1b/gcc/config/i386/linux-oldld.h	Thu Sep 24 10:49:44 1998
@@ -32,7 +32,7 @@
 /* Specify predefined symbols in preprocessor.  */
 
 #undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dunix -Dlinux -Asystem(posix)"
+#define CPP_PREDEFINES "-Dunix -Di386 -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(cpu)"
 
 #undef CPP_SPEC
 #define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
diff -urN egcs-1.1b.orig/gcc/config/i386/linux.h egcs-1.1b/gcc/config/i386/linux.h
--- egcs-1.1b.orig/gcc/config/i386/linux.h	Tue Jul 14 00:38:43 1998
+++ egcs-1.1b/gcc/config/i386/linux.h	Thu Sep 24 10:50:14 1998
@@ -151,7 +151,7 @@
 #define WCHAR_TYPE_SIZE BITS_PER_WORD
     
 #undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-D__ELF__ -Dunix -Dlinux -Asystem(posix)"
+#define CPP_PREDEFINES "-D__ELF__ -Dunix -Di386 -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386)"
 
 #undef CPP_SPEC
 #ifdef USE_GNULIBC_1

--
Niels Kristian Bech Jensen - nkbj@image.dk - http://www.image.dk/~nkbj/

---------->>  Stop software piracy --- use free software!  <<----------





More information about the Gcc-patches mailing list