Ticket #90 (assigned defect)
Fixes for building with --as-needed
| Reported by: | Chewi | Owned by: | dsmith |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | build system | Version: | 0.6.00 |
| Keywords: | Cc: |
Description
I'm not sure if you've heard of the --as-needed linker option but it prevents the linker from establishing unnecessary dependencies, thus speeding up start times and avoiding breakages when upgrading libraries.
Cwiid currently fails to build with --as-needed because the linking order in the makefiles is wrong and some dependencies are not explicitly stated. For example, wminput depends on libbluetooth and libpthread because it calls functions (such as str2ba) from them directly, not just through libcwiid.
Here is a patch that fixes all this. It's worth applying because I've already seen one Debian bug report about this and the option is commonly used by Gentoo users. You can read more about --as-needed here.
