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

Niels Kristian Bech Jensen
Mon Oct 5 01:12:00 GMT 1998

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

>   In message <>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.

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

# 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 - -

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

More information about the Gcc-patches mailing list