[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

GCC predefines



After poking at a few packages, I realize that there is a significant
difference in how GCC is configured on the Debian/NetBSD setup. To wit, the
predefines are markedly different, and at least one symbol that I would
think should be there isn't.

Example from a Debian GNU/Linux system (running woody):

lucifer@crow:$ gcc-3.0 -v
Reading specs from /usr/lib/gcc-lib/i386-linux/3.0.4/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux
Thread model: posix
gcc version 3.0.4

And from a Debian GNU/NetBSD system (running unstable):
root@thenet# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-unknown-netbsdelf-debian/3.2.1/specs
Configured with: /tmp/Build/gcc-3.2/gcc-3.2-3.2.1ds0/src/configure -v --enable-languages=c,c++,f77,proto,objc --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --disable-__cxa_atexit --enable-objc-gc i386-unknown-netbsdelf-debian
Thread model: single
gcc version 3.2.1 20020830 (Debian prerelease)

Yes, I do realize that it's 3.0 vs. 3.2, but the old 3.0 NetBSD had the
same issue. To wit:

lucifer@crow:$ gcc-3.0 -dumpspecs
...
*predefines:
-D__ELF__ -Dunix -Dlinux -Asystem=posix
...

And from the NetBSD box:

root@thenet# gcc -dumpspecs
...
*predefines:
-D__NetBSD__ -D__ELF__ -Asystem=unix -Asystem=NetBSD
...

Both are ELF systems, and both define the OS standard symbol for their
respective OSen. However, what I can't figure out is why the NetBSD config
doesn't have -Dunix - it certainly seems to support the various files that
I've seen that used as a trigger for (unistd.h, etc).

Is this just a crufty value from Days of Yore when NetBSD didn't have
support for the standard that symbol represents? If so, which file do I
need to poke at in GCC to convince it otherwise, at least on Debian/NetBSD
systems?

I'm also wondering just what is up with the -A flags, and what suitable
values for those are...
-- 
***************************************************************************
Joel Baker                           System Administrator - lightbearer.com
lucifer@lightbearer.com              http://users.lightbearer.com/lucifer/

Attachment: pgphERtRsNK6N.pgp
Description: PGP signature


Reply to: