[Build-common-hackers] Bug#578303: Bug#578303: Bug#578303: Bug#578303: Splits CC into multiple env-var words

Jonas Smedegaard jonas at jones.dk
Wed Apr 28 06:26:35 UTC 2010


On Mon, Apr 19, 2010 at 09:14:11AM +0300, Peter Eisentraut wrote:
>On sön, 2010-04-18 at 23:14 +0200, Jonas Smedegaard wrote:
>> severity 578303 wishlist
>> retitle 578303 would be nice if CC could hold part of commandline
>> tags 578303 wontfix
>> thanks
>>
>> On Sun, Apr 18, 2010 at 09:39:12PM +0300, Peter Eisentraut wrote:
>>
>> >Followup to #576967, here is a valid example of a multiword CC
>> >
>> >CC='ccache gcc'
>>
>> That's abuse of the CC variable.  Only if treated as part of a 
>> command line (as opposed to a single command) will it work.
>
>What else would you use it for?
>
>> The CC variable is not supposed to hold a part of a commandline, but 
>> a single command.
>
>I have to ask, where do you get this idea?  The above has worked 
>forever and I have had it in use for a long time.  Using multiple words 
>for CC is common in autotools land and is required in some situations, 
>such as when you have to choose the target architecture by means of an 
>argument.  Why are you so opposed to allowing it?
>
>Also note that using multiword values is common for other command 
>variables, such as
>
>CPP = gcc -E
>YACC = bison -y
>
>These are analogous to CC in all respects I can think of, except of 
>course that make doesn't set them by default.
>
>> As is documented in its man page, when ccache is used in an 
>> environment too large to compose the commandline by hand, use the 
>> alternative approach of symlinked commands instead of appending 
>> ccache in front of the actual compiler name.
>
>There are always ways around everything, but that doesn't mean one has 
>to battle to prohibit the alternatives.

Sorry, I was busy elsewhere lately (thanks for the ping!)...

Ok, you are right - it is used more widely than as a hack: I found 
support for it in a libtool snippet in an aclocal.m4.

What I meant by "please provide a example" was an actual packaging using 
this in a way where use of CFLAGS was not the more proper approach, but 
you are right, there is no need making CDBS inflexible here.


I will adapt to support spaces in that variable (and others similar).


  - Jonas

-- 
* Jonas Smedegaard - idealist & Internet-arkitekt
* Tlf.: +45 40843136  Website: http://dr.jones.dk/

  [x] quote me freely  [ ] ask before reusing  [ ] keep private
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/build-common-hackers/attachments/20100428/39ddc1f1/attachment.pgp>


More information about the Build-common-hackers mailing list