From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 2513 invoked from network); 25 Jan 1999 22:38:20 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 25 Jan 1999 22:38:20 -0000 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [153.19.170.1]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id RAA04230 for ; Mon, 25 Jan 1999 17:10:01 -0500 Received: from localhost (macro@localhost) by delta.ds2.pg.gda.pl (8.8.8/8.8.8) with SMTP id XAA24206 for ; Mon, 25 Jan 1999 23:06:24 +0100 (MET) Date: Mon, 25 Jan 1999 23:06:23 +0100 (MET) From: "Maciej W. Rozycki" To: axp-list@redhat.com Subject: Re: follow-up on Compiling X on Alpha In-Reply-To: <19990125204218.11356.qmail@hotmail.com> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 25 Jan 1999, Designer 7 wrote: > > See what definitions `/lib/cpp -dM /dev/null' dumps. X uses /lib/cpp > as > >a C preprocessor. > > ok.. so this is what I got: > #define linux 1 > #define _LONGLONG 1 > #define __alpha__ 1 > #define __ELF__ 1 > #define unix 1 > > is this it? or am I missing anything? is __alpha suppose to show up here > too? The C preprocessor program has an internal list of predefines. You probably has your `lib/cpp' set up as a symlink to the real program located under '/usr/lib/gcc-lib' directory tree. This is not the best available solution as the internal list of `cpp' is fixed -- it cannot be changed without recompilation. A much better solution is to use `gcc -E' which also invokes the C preprocessor but as this one uses the `gcc' driver, the 'specs' file is being taken into account where additional predefines as well as other parameters may be set (the file is plain text). Unfortunately, one may not just replace the `/lib/cpp' symlink with a shell script which execs `gcc -E' as the command line syntax of these two is slightly different. There was an example `/lib/cpp' replacemet script posted on one of egcs-related mailing lists some time ago which solved some of these compatibility issues. You may check that one -- I use it for a few months now and I see no troubles. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available +