[PATCH 2/2] build: only link to what we really use

Carl Worth cworth at cworth.org
Sat Oct 30 13:38:23 PDT 2010


On Sat, 30 Oct 2010 02:16:47 +0300, Felipe Contreras <felipe.contreras at gmail.com> wrote:
> At least linux has the -Wl,--as-needed option.
> 
> Signed-off-by: Felipe Contreras <felipe.contreras at gmail.com>

Thanks, Felipe.

I've pushed this.

I also followed it up with a change to do a configure-time check for the
-Wl,--as-needed option, (since I don't like having platform-specific
conditionals in the Makefile). And this conditional:

> -ifneq ($(LINKER_RESOLVES_LIBRARY_DEPENDENCIES),1)
> +ifeq ($(LINKER_RESOLVES_LIBRARY_DEPENDENCIES),1)
> +FINAL_NOTMUCH_LDFLAGS += -Wl,--as-needed
> +else

wasn't only platform-specific, but actually using one conditional, ("linker
resolved library dependencies"), for another, ("platform is
linux"). That's a kind of fragility that I also don't like.

But thanks very much for adding the --as-needed option.

And please let me know if everything is building well for you now. (For the
first patch you sent in this set, I had already pushed my own version.)

-Carl

-- 
carl.d.worth at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20101030/6c8e5be7/attachment.pgp>


More information about the notmuch mailing list