libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CC can be a program name *with arguments*


From: Ralf Wildenhues
Subject: Re: CC can be a program name *with arguments*
Date: Wed, 2 Mar 2005 14:43:29 +0100
User-agent: Mutt/1.4.1i

Hi Gary, Peter,

* Gary V. Vaughan wrote on Tue, Mar 01, 2005 at 03:43:04PM CET:
> Ralf Wildenhues wrote:
> > 
> > Sure.  But we are talking about m4/libtool.m4, right?
> > This happens at configure time.
> > 
> > I want, in a libtoolized project,
> >   ../configure CC='pgcc-78.9 -foo-option'
> > to succeed in choosing Portland compiler options.  No multiple compilers
> > involved here.
> 
> Ah yes.  Thinko.  Currently we should recommend:
> 
>   ../configure CC='/opt/pgcc-78.9/bin/pgcc -foo-option'
> 
> But, I agree that supporting multiple compilers in users' PATH is also
> a nice feature.  Like you said, "let's do both!" :-)  We'll need an
> entry in sh.test to spot switches missing the '*' inside 'case $cc_basename'
> to save us forgetting in the future as part of the patch too.

Go ahead.

> >>  cc_basename=`$echo X"$compiler" | $Xsed -e 's%^[  ]*\([^  ]*\).*$%\1%'`
> > 
> > Why?  People writing
> >   CC=' gcc'
> > by accident are people that get run over by accident.  :->
> 
> Be liberal in what input you accept... besides, plenty of our concatenation
> loops leave a leading space, so it won't hurt to get into the habit of
> taking leading whitespace into account.
> 
> I forgot the path stripping too, gah!  Let me try again:
> 
>   cc_basename=`$echo X"$compiler" \
>           | $Xsed -e 's%.*/%%;s%^[    ]*\([^  ]*\).*$%\1%'`

I wonder whether any compiler other than of the GCC type uses
  $system-gcc
as in 
  x86-linux-gnu-g++
then we might want to recognize that as well.
(For GCC itself that is not necessary, its front-ends are not recognized
by the name but by __GNUC__).



* Peter O'Gorman wrote on Wed, Mar 02, 2005 at 02:29:20PM CET:
> 
> I'm confused as to whether all this means that my original patch is 
> acceptable or not :)

Your original patch is acceptable (but not sufficient to solve all of
the problems).

Regards,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]