specs question.

IainS developer@sandoe-acoustics.co.uk
Tue Apr 13 19:21:00 GMT 2010


On 13 Apr 2010, at 19:05, Peter O'Gorman wrote:

>> gcc hello.c  -g -o hc  => dsymutils gets run  (not expected from the
>> syntax, assuming that sources are irrelevant)
>>
>> gcc hello.o -g -o hc  => no dsymutils (expected from the absence of  
>> '.o'
>> in the list)

> We don't want to run dsymutil if there are .o files, let the developer
> do that.

OK, although AFAICT,
  it should be harmless doing it in the general case (and, to some  
extent, more friendly).

> If someone just does gcc -g -o foo foo.c, then any debugging  
> information
> will be lost when the temporary .o file is removed, thus, to allow
> debugging such a foo, the compiler must run dsymutil.

That's understood - although see below for a comment on Fortran***.

> Strange, Apple's gcc-4.2 doesn't have this bug (-lm), yet that portion
> of the specs appears identical.

indeed - although of course there's no reason to suppose that gcc/ 
gcc.c is identical in the two cases (I can check that at some stage)

My question has more to do with whether the apparent intention of the  
spec is being honored..
... and also why it doesn't work if I add more extensions (e.g. to  
extend coverage to Fortran, which Apple are not trying to cover in  
their case).

[***Even if I remove the %{.xxx.xxx.xx: } in the dsyutil section,  
there's a subsidiary issue with the Fortran case in that the debug  
info is only working if I put -save-temps on the CL].

cheers,
Iain



More information about the Gcc mailing list