[Glibc-bsd-devel] workaround for gcc macro fuckage

Santiago Vila sanvila@unex.es
Tue, 2 Dec 2003 12:58:00 +0100 (CET)


On Mon, 1 Dec 2003, Nathan Hawkins wrote:

> On Tue, Dec 02, 2003 at 02:38:31AM +0100, Robert Millan wrote:
> >
> > Hi there!
> >
> > As discussed on IRC, gcc-3.4 preprocessor macros (e.g, __NetBSD_kernel__,
> > __FreeBSD_kernel__) not being parsed by cpp-3.4. Guillem said he'd handle
> > this bug.
> >
> > In the meantime, I wrote this simple /usr/bin/gcc wrapper that execs gcc
> > after adding the proper flags to define the missing macros (e.g,
> > -D__NetBSD_kernel__). It is attached.
> >
> > Santiago, please could you add the /usr/bin/gcc wrapper for the
> > gcc-defaults-kbsd package on your next upload?
> >
> > P.S: the wrapper needs bootstrap, first compile must be with:
> >      $ gcc -D__NetBSD_kernel__ gcc.c -o gcc
>
> Shouldn't those go in the target files in gcc? A wrapper seems like the
> wrong fix to me, unless it's intended to be very temporary.

I mostly agree.

Before doing that, I would put the wrapper in the gcc-3.4 package instead.

[ The packages generated by gcc-defaults are OS-neutral, and I think
  it is a good thing that they continue to be ].

Anyway, I think this should not be very difficult to fix. I will try
to find the right fix first.