specs question.

IainS developer@sandoe-acoustics.co.uk
Mon Apr 12 23:44:00 GMT 2010


On 13 Apr 2010, at 00:22, Ian Lance Taylor wrote:

> IainS <developer@sandoe-acoustics.co.uk> writes:
>
>> yeah .. we use it in Darwin's dsymutil spec.
>>
>> %{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
>>    %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm: \
>>   %{gdwarf-2:%{!gstabs*:%{!g0: dsymutil %{o*:%*}%{!
>> o:a.out}}}}}}}}}}}}"
>>    %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} %{F*} }}}}}}}\n"
>>
>>
>> if you put "-lm" on the c/l dsymutil doesn't get called.
>
> Note that in the specs language the %{.XXX: ...} is matched against
> the filename passed to the gcc driver.  It doesn't know the source
> language of a .o file.  So if you are linking, and passing .o files,
> then this approach won't work.

well, my first question to myself was 'why are there not ".o" and ".a"  
in the list?'  ;))

There are two aspects to this ...
1/ the fact that this is probably not the right thing to do in that  
spec - easily solved by deleting it..

2/ The weird effect where putting -lm on the c/l causes the  
substitution to fail - which hints at a deeper problem.
FWIW I couldn't (quickly) find any other spec using that syntax - so  
perhaps it's not important.

cheers,
Iain




More information about the Gcc mailing list