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: Tue, 1 Mar 2005 10:25:16 +0100
User-agent: Mutt/1.4.1i

Hi guys,

* Gary V. Vaughan wrote on Fri, Feb 25, 2005 at 01:21:14PM CET:
> Bob Friesenhahn wrote:
> > On Thu, 24 Feb 2005, Peter O'Gorman wrote:
> > 
> >> Okay to apply to branch-1-5 and then forward port?
> > 
> > Doesn't it make most sense to fix cc_basename so that it doesn't include
> > any trailing cruft?  Then the switch would not need to be changed.  The
> > wildcard might match a command name which differs by later characters.
> 
> My thoughts exactly.  cc_basename is only ever used in case statements,
> so lets set it with:
> 
>   cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%;s%[    ].*$%%'`

You guys ever encountered a system with compilers named
  gcc-3.4.1
  gcc-3.4.2
  icc-8.1
  ...
?

I think the original patch was useful, and have yet to see an instance
where it causes trouble (e.g., two compilers starting with the same
prefix;  that could be disambiguated by leaving out the * at the end of
the case pattern on a case-by-case basis).

Independently still, cc_basename should be calculated like above
(not like is done currently, and also not like Gary suggested,

|  cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%;s%[     ]*.*$%%'`

which looks quite bogus to me, as it deletes everything.)

Maybe we need to adjust for things like ccache and distcc here, so the
thingy takes the second argument (I still have not looked at how they
are typically used together with libtool, so this is just speculation)
for better matching.  Dunno if anybody has ever used those together with
non-GCC compilers and with libtool.

Regards,
Ralf




reply via email to

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