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

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

Date: Sat, 30 Oct 2010 13:38:23 -0700

To: Felipe Contreras, notmuch@notmuchmail.org

Cc:

From: Carl Worth


On Sat, 30 Oct 2010 02:16:47 +0300, Felipe Contreras <felipe.contreras@gmail.com> wrote:
> At least linux has the -Wl,--as-needed option.
> 
> Signed-off-by: Felipe Contreras <felipe.contreras@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@intel.com
part-000.sig (application/pgp-signature)

Thread: