-Dgnu_{linux,hurd}
Franz Sirl
Franz.Sirl-kernel@lauterbach.com
Mon Apr 15 13:10:00 GMT 2002
On Monday 15 April 2002 21:42, Andi Kleen wrote:
> Mark Mitchell <mark@codesourcery.com> writes:
> > > Yeah, I saw that. I wanted to make sure I made this point before he
> > > spent too much time on Windows.
> > >
> > > Isn't it likely that there will be a few other systems with the same
> > > needs, too?
> >
> > Let's hope not. We can always back off as needs be, but hopefully we
> > can eliminate a lot of these. It would certainly help to make programs
> > more portable.
>
> It doesn't look like a good tradeoff for me. I bet there will be much
> more problems with programs breaking on Linux because linux isn't defined
> anymore than the very unlikely case that you have some other system with
> a symbol called linux that means something else.
>
> While it's theoretically correct following POSIX/ANSI-C it doesn't look
> like a very useful change to me in practice.
Well, _nobody_ relies on -Dlinux being in CPP_PREDEFINES (!) at least,
otherwise we would have been bitten by that on powerpc-linux-gnu. I think
Zack's patch is just right, there should be near to zero non-__MACRO__
defines in CPP_PREDEFINES, if other variations are needed they should go into
CPP_SPEC manually like we do on PPC-SYSV:
%{!undef: \
%{!ansi: \
%{!std=*:-Dunix -D__unix -Dlinux -D__linux} \
%{std=gnu*:-Dunix -D__unix -Dlinux -D__linux}}} \
-Asystem=unix -Asystem=posix %{pthread:-D_REENTRANT}"
Franz.
More information about the Gcc-bugs
mailing list