[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CC can be a program name *with arguments*
From: |
Gary V. Vaughan |
Subject: |
Re: CC can be a program name *with arguments* |
Date: |
Tue, 01 Mar 2005 14:43:04 +0000 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041103) |
Hallo Ralf!
Ralf Wildenhues wrote:
>>>You guys ever encountered a system with compilers named
>>> gcc-3.4.1
>>> gcc-3.4.2
>>> icc-8.1
>>> ...
>>
>>Yep, but you would need to build a different libtool for each compiler.
>>Relying on the compiler checks performed on one working for another is
>>likely to cause trouble.
>
>
> 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.
> Well, yes. Maybe it could be worth doing s#-.*## to kill version
> appendices. But that would be more limiting than necessary IMVHO
> (nobody specified version appendices had to look like this).
Agreed.
>> 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%'`
Cheers,
Gary.
--
Gary V. Vaughan ())_. address@hidden,gnu.org}
Research Scientist ( '/ http://tkd.kicks-ass.net
GNU Hacker / )= http://www.gnu.org/software/libtool
Technical Author `(_~)_ http://sources.redhat.com/autobook
signature.asc
Description: OpenPGP digital signature
- Re: CC can be a program name *with arguments*, Ralf Wildenhues, 2005/03/01
- Re: CC can be a program name *with arguments*, Bob Friesenhahn, 2005/03/01
- Re: CC can be a program name *with arguments*, Peter O'Gorman, 2005/03/02
- Re: CC can be a program name *with arguments*, Ralf Wildenhues, 2005/03/02
- Re: CC can be a program name *with arguments*, Bob Friesenhahn, 2005/03/02