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: Problem compiling glibc with gcc 2.95.3


At 16:30 20.03.2001, Daniel Jacobowitz wrote:
>On Tue, Mar 20, 2001 at 12:31:13PM -0000, David Korn wrote:
> >   I can think of several ways to make longer term fixes:
> >
> > 1) gcc-2.95.3+ could notice when it was being asked for the internal
> > subprogram 'cpp' and return the result as if it had been asked for 'cpp0'.
> > This is a bit of a nasty hack, as it would fail if someone asked for
> > the path to cpp and then stripped off the path and appended the filename
> > themselves.
>
>Which, incidentally, is exactly what glibc does:
>rpcgen-cmd = $(built-program-cmd) -Y `$(CC) -print-file-name=cpp | \
>                                       sed 's|/cpp$$||'`

But -print-file-name is meant to search for library components and is 
misused in this case to search for /lib/cpp. I guess a better method would 
be to change the sed to

         sed 's|cpp$||' | sed 's|/$||'

and if that returns an empty string try the same with the result of 'which 
cpp' to find cpp in $PATH. That should cover more cases I guess.

Franz.


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