-no-undefined broken for HEAD

Stephan Kulow coolo at kde.org
Tue Aug 13 18:35:50 BST 2002


On Tuesday 13 August 2002 17:14, Zack Rusin wrote:
> On Tuesday 13 August 2002 05:49, Allan Sandfeld Jensen wrote:
> > OTOH I am not sure exactly what you use this flag for, I just looked
> > into it because it broke compilation with the Sun Workshop 6.4
> > C-compiler. When adding the equivalent of '-zdefs' to g++
> > ('-Wl,-no-undefined') while compiling libkdecore or libkdeui, linking
> > broke in exactly the same way: The linker complained that the library
> > depended on other shared libraries.
>
> When compiling shared libraries on systems that support them, undefined
> symbols are allowed and left to be resolved by the runtime loader,
> --no-undefined passed to the linker disallows such undefined symbols.
> And we use it in Kopete because it sure as hell makes sense to detect
> those errors at compile time instead of letting one of the plugins
> crash at run-time. Of course forgetting to implement a function and
> blaming the linker is silly, but so is making libtool ignore one of its
> arguments. If authors put '-no-undefined' in Makefile.am in the LDFLAGS
> section, then they did have a good reason for it and ignoring it on all
> platforms because few were breaking with it is not a solution.

The GNU ld never checked that with libtool AFAIK. But am_edit creates
.closure files when it sees -no-undefined in LDFLAGS. If this is broken,
then it's an am_edit problem. But undefined references shoud be detected.

Greetings, Stephan





More information about the kde-core-devel mailing list