On 13 Apr 2010, at 00:22, Ian Lance Taylor wrote:
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.

(I saw your post about java .. I wasn't grepping the right things .. )

Since we're tagged onto the LINK_COMMAND_SPEC - this will get evaluated whenever that does. ... (not 100% sure when that is - when the driver is invoked or when the collect phase is invoked.. ). .. also in_files and out_files can exhibit gotchas (e.g. anything beginning -l isn't eligible for treatments like %<lxx I found recently)

---

It clearly depends on something no-obvious.

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)

gcc hello.c -g -o hc -lm => no dsymutils... (not at all expected ... )

adding .for to the list does not result in dsymutils getting run .. (expected by similarity, but not by logic)

removing the whole of the bracketed list - results in all of those cases working.

I think the right local solution is to remove the expression (I'll run that by Mike Stump)...

I'm pursuing this in case there's a latent bug that should be reported.
cheers,
Iain


Reply via email to