Subject: Re: selecting ARM endianness [was: CVS commit: syssrc]
To: Ben Harris <bjh21@netbsd.org>
From: Todd Vierling <tv@wasabisystems.com>
List: source-changes
Date: 02/19/2001 13:47:35
On Mon, 19 Feb 2001, Ben Harris wrote:

: > 	we did it for evbsh3/include/endian_machdep.h, however I don't really
: > 	feel it safe enough.  the symbol definition can change easily if
: > 	we use different cpp (or cc -E).
:
: cc -E seems to get all the predefines correctly:
:
: viking:~$ /opt/netbsd/cross/bin/arm-unknown-netbsdelf-gcc -v -E -x c /dev/null
: Reading specs from /opt/netbsd/cross/lib/gcc-lib/arm-unknown-netbsdelf/2.95.2/specs
: gcc version 2.95.2 19991024 (release)
:  /opt/netbsd/cross/lib/gcc-lib/arm-unknown-netbsdelf/2.95.2/cpp -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=95 -Dunix -Darm -D__arm__ -D__NetBSD__ -D__ELF__ -D__unix__ -D__arm__ -D__arm__ -D__NetBSD__ -D__ELF__ -D__unix -D__arm -Asystem(unix) -Asystem(NetBSD) -Acpu(arm) -Amachine(arm) -D__CHAR_UNSIGNED__ -D__ARM_ARCH_3__ -D__APCS_32__ -D__SOFTFP__ -D__VFP_FP__ /dev/null
: GNU CPP version 2.95.2 19991024 (release) (ARM NetBSD/ELF)

As it should.  We don't use the /usr/libexec/cpp directly, although the
NetBSD 1.5 /usr/bin/cpp does call it[*].

[*] When we switch to gcc 2.95.2 in-tree, I will be replacing the
    /usr/bin/cpp script with one that uses cc -E to preprocess files, rather
    than /usr/libexec/cpp.  It seems that cpp in gcc 2.95.2 doesn't
    predefine anything, and this change will be needed if and when we go to
    gcc 3.0 (which has no `internal' cpp executable at all).

-- 
-- Todd Vierling <tv@wasabisystems.com>  *  Wasabi NetBSD:  Run with it.
-- NetBSD 1.5 now available on CD-ROM  --  http://www.wasabisystems.com/