Patch to remove re-assert warnings on powerpc-*-linux-*
Daniel Jacobowitz
drow@false.org
Mon Mar 29 08:28:00 GMT 1999
On Mon, Mar 29, 1999 at 12:11:34AM -0700, Jeffrey A Law wrote:
> I don't think this is correct.
>
> Look at how CPP_OS_LINUX_SPEC is used in CPP_SPEC.
>
> Specifically, it supposed to be used to provide linux defines and assertions
> when the -mcall-linux flag is given to the compiler.
>
> If you remove stuff from CPP_OS_LINUX_SPEC you will break that functionality.
> This goes for both -D arguments and assertions.
>
> I think to really resolve this issue you're going to have to go the other way
> and remove the linux stuff from CPP_PREDEFINES in linux.h (and make sure
> everything has an equivalent in CPP_OS_LINUX_SPEC).
That makes sense.
I assume I should also fix the conditions for -Dunix and -Dlinux. Is
adding -Asystem(posix) also correct? Should -D__ELF__ be removed as
well? I didn't because I couldn't see where to re-add it best.
New try attached.
Dan
/--------------------------------\ /--------------------------------\
| Daniel Jacobowitz |__| CMU, CS class of 2002 |
| Debian GNU/Linux Developer __ Part-Time Systems Programmer |
| dan@debian.org | | drow@cs.cmu.edu |
\--------------------------------/ \--------------------------------/
Sat Mar 27 00:10:35 1999 Daniel Jacobowitz <dan@debian.org>
* config/rs6000/sysv4.h (CPP_OS_LINUX_SPEC): Fix conditions
for -Dunix and -Dlinux, and remove duplicate definition.
* config/rs6000/linux.h (CPP_PREDEFINES): Remove -Dunix,
-Dlinux, -Asystem(linux), and -Asystem(unix). Add
-Asystem(posix).
Index: sysv4.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/rs6000/sysv4.h,v
retrieving revision 1.17
diff -u -r1.17 sysv4.h
--- sysv4.h 1999/01/22 09:30:07 1.17
+++ sysv4.h 1999/03/29 16:24:55
@@ -1330,12 +1330,8 @@
#ifndef CPP_OS_LINUX_SPEC
#define CPP_OS_LINUX_SPEC "-D__unix__ -D__linux__ \
-%{!ansi: -Dunix -Dlinux } \
+%{!undef:%{!ansi:%{!std=*:-Dunix -Dlinux}%{std=gnu*:-Dunix -Dlinux}}}
-Asystem(unix) -Asystem(linux)"
-#endif
-
-#ifndef CPP_OS_LINUX_SPEC
-#define CPP_OS_LINUX_SPEC ""
#endif
/* Solaris support. */
Index: linux.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/rs6000/linux.h,v
retrieving revision 1.14
diff -u -r1.14 linux.h
--- linux.h 1999/02/02 19:10:15 1.14
+++ linux.h 1999/03/29 16:24:55
@@ -24,7 +24,7 @@
#undef CPP_PREDEFINES
#define CPP_PREDEFINES \
- "-DPPC -D__ELF__ -Dunix -Dlinux -Dpowerpc -Asystem(unix) -Asystem(linux) -Acpu(powerpc) -Amachine(powerpc)"
+ "-DPPC -D__ELF__ -Dpowerpc -Asystem(posix) -Acpu(powerpc) -Amachine(powerpc)"
#undef CPP_OS_DEFAULT_SPEC
#define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
More information about the Gcc-patches
mailing list