[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: -Wl,--as-needed considered possibly harmful



> Ok, let's consider another very simple case:
> libshout allows to perform streaming of speex, vorbis, and theora formats.
> 
> Hence, when asking for the libs to link with, you got -lspeex and -ltheora
> since it's needed to cover all build cases.
> 
> However, most of the applications don't need to link against theora and
> speex.

Doesn't libshout reference symbols from libspeex and libtheora?

If it does, resulting binary must be linked against both these libraries.
Unresolved symbols within binaries are really bad, because they will once
be unexpectedly called (e.g. in some init or deinit or error-handling), and
binary will crash, leaving user data unsaved.

If it does not, then what for -lspeex and -ltheora are in the script output?



Reply to: