This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: __i386__ and cpp


On Tue, 3 March 1998, 01:58:16, law@cygnus.com wrote:

 > 
 >   In message <m0y9Xl6-00058fC@ocean.lucon.org>you write:
 >   > > 
 >   > > 
 >   > >   In message <m0y3T4L-0004ecC@ocean.lucon.org>you write:
 >   > >   > __i386__ has been dropped from cpp in 1996. It
 >   > >   > causes a problem for imake since it calls cpp
 >   > >   > directly. It would be nice for egcs 1.0.2 to
 >   > >   > define __i386__ on all x86 platforms.
 >   > > Actually, it looks like Imake is involing /lib/cpp, which is
 >   > > a symlink into the gcc-2.7 gcc-lib directory on my linux boxes.
 >   > > 
 >   > > So how exactly are folks getting the egcs cpp when they're using
 >   > > imake?
 >   > > 
 >   > 
 >   > How about people who uses egcs 1.0.1 as their only compiler :-)?
 >   > They will make such a link.
 > So, do we just provide the script in the source dir for the user to
 > install, or do we actually arrange to install it in the library
 > directory?

Well I'd suppose to leave this on the distributor. Tell Debian, Redhat,
etc. to install the following script as /lib/cpp:

------------ Cut here: /lib/cpp ----------------
#! /bin/sh

# set -x

# First lets look if there is a file argument; otherwise we'll need to instruct
# gcc to read from stdin.

got_file=no
for f
do
	[ -f "$f" ] && { got_file=yes; break; }
done

# The '-x c' is necessary to suppress error message like
#  gcc: /home/manfred//.holiday: linker input file unused since linking not done
# for files with unknown extensions.
exec gcc -x c -E ${1+"$@"} `[ $got_file = no ] && echo -`
--------- Cut here: end of /lib/cpp -------------

How about that? I'm using this script for a cpp/imake based GUI development
environment I developed for my employer, hence I believe it's fool-proof, now.

Manfred


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]