This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to fix CPP_PREDEFINES on linux/alpha and linux/x86.
- To: Jeffrey A Law <law at cygnus dot com>
- Subject: Re: Patch to fix CPP_PREDEFINES on linux/alpha and linux/x86.
- From: Niels Kristian Bech Jensen <nkbj at image dot dk>
- Date: Mon, 5 Oct 1998 10:08:04 +0200 (CEST)
- cc: egcs-patches at cygnus dot com
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! <<----------