Ticket #90 (assigned defect)

Opened 3 years ago

Last modified 3 years ago

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.

http://www.gentoo.org/proj/en/qa/asneeded.xml

Attachments

as-needed.patch (4.3 kB) - added by Chewi 3 years ago.

Change History

Changed 3 years ago by Chewi

Changed 3 years ago by Chewi

  • version changed from 0.5.02 to 0.6.00

Set this to the wrong version.

Changed 3 years ago by dsmith

  • status changed from new to assigned

This came up awhile ago (#47), but you provide some good arguments, and I don't really agree with my second point anymore. I'm going to read your link to get a better understanding of what as-needed does, but will probably apply your patch. Thanks.

Note: See TracTickets for help on using tickets.