Patch to fix CPP_PREDEFINES on linux/alpha and linux/x86.

Niels Kristian Bech Jensen nkbj@image.dk
Mon Oct 5 01:12:00 GMT 1998


On Mon, 5 Oct 1998, Jeffrey A Law wrote:

> 
>   In message <Pine.LNX.3.96.980924110754.9362A-100000@hafnium.nkbj.dk>you write:
>   > CPP_PREDEFINES in egcs-1.1b doesn't include architecture specific
>   > information on linux/alpha and linux/x86. This breaks Imake (and maybe
>   > other programs) which depend on /lib/cpp exporting such information.
>   > 
>   > This patch should fix the problem:
> Defining linux, alpha or i386 is wrong unconditionally is wrong -- it is a
> namespace violation.  xfree/imake and other programs need to be fixed.
> 
Until these fixes become a reality it may be a good idea to write
something about this (including a workaround -- see below) in the FAQ.

Someon posted this script, which I now use as /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 -`

--
Niels Kristian Bech Jensen - nkbj@image.dk - http://www.image.dk/~nkbj/

---------->>  Stop software piracy --- use free software!  <<----------




More information about the Gcc-patches mailing list