ld changed linking behaviour in precise?

Christoph Mathys eraserix at gmail.com
Wed Apr 18 14:18:18 UTC 2012

Today, my build suddenly had a linker error out of nowhere. Further
investigations revealed:
The default of the linker flag --as-needed seems to be different
compared to lucid and precise a few days ago. While earlier versions
assumed --no-as-needed by default, now the default seems to be to use
--as-needed. Because of that, some libraries which were needlessly
linked against others were not linked anymore. This later caused
'undefined reference' warnings, because said needlessly linked
libraries were no longer recursivly included in other libraries.

Assuming I diagnosed this correctly, was this change intentional?

And for the future: Where can I find the defaults of such command line
switches for gcc/ld? Are there any distro specific overrides? Because
'man ld' still tells me that --no-as-needed is the default...


More information about the Ubuntu-devel-discuss mailing list