[PATCH 2/8] Split CONFIGURE_LDFLAGS out of FINAL_LIBNOTMUCH_LDFLAGS

Subject:[PATCH 2/8] Split CONFIGURE_LDFLAGS out of FINAL_LIBNOTMUCH_LDFLAGS

Date:Tue, 22 Aug 2017 22:43:33 +0000

To:notmuch@notmuchmail.org

Cc:

From:Vladimir Panteleev


Previously, FINAL_LIBNOTMUCH_LDFLAGS contained two different kinds of
flags:
- Linker configuration flags (LDFLAGS and AS_NEEDED_FLAGS)
- List of items to link (CONFIGURE_LDFLAGS)

As it can be necessary to prepend to the list of items to link, while
still allow them to be affected by the position-dependent linker
configuration flags, split CONFIGURE_LDFLAGS out of
FINAL_LIBNOTMUCH_LDFLAGS and mention it explicitly when necessary.
---
 Makefile.global    | 2 +-
 Makefile.local     | 2 +-
 lib/Makefile.local | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile.global b/Makefile.global
index cae4c7d1..5d10bff7 100644
--- a/Makefile.global
+++ b/Makefile.global
@@ -62,4 +62,4 @@ ifneq ($(LINKER_RESOLVES_LIBRARY_DEPENDENCIES),1)
 FINAL_NOTMUCH_LDFLAGS += $(CONFIGURE_LDFLAGS)
 FINAL_NOTMUCH_LINKER = CXX
 endif
-FINAL_LIBNOTMUCH_LDFLAGS = $(LDFLAGS) $(AS_NEEDED_LDFLAGS) $(CONFIGURE_LDFLAGS)
+FINAL_LIBNOTMUCH_LDFLAGS = $(LDFLAGS) $(AS_NEEDED_LDFLAGS)
diff --git a/Makefile.local b/Makefile.local
index af12ca7f..9b0f7d30 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -246,7 +246,7 @@ notmuch_client_modules = $(notmuch_client_srcs:.c=.o)
 notmuch.o: version.stamp
 
 notmuch: $(notmuch_client_modules) lib/libnotmuch.a util/libnotmuch_util.a parse-time-string/libparse-time-string.a
-	$(call quiet,CXX $(CFLAGS)) $^ $(FINAL_LIBNOTMUCH_LDFLAGS) -o $@
+	$(call quiet,CXX $(CFLAGS)) $^ $(FINAL_LIBNOTMUCH_LDFLAGS) $(CONFIGURE_LDFLAGS) -o $@
 
 notmuch-shared: $(notmuch_client_modules) lib/$(LINKER_NAME)
 	$(call quiet,$(FINAL_NOTMUCH_LINKER) $(CFLAGS)) $(notmuch_client_modules) $(FINAL_NOTMUCH_LDFLAGS) -o $@
diff --git a/lib/Makefile.local b/lib/Makefile.local
index 0b5c4b08..fbcdbda8 100644
--- a/lib/Makefile.local
+++ b/lib/Makefile.local
@@ -65,7 +65,7 @@ $(dir)/libnotmuch.a: $(libnotmuch_modules)
 	$(call quiet,AR) rcs $@ $^
 
 $(dir)/$(LIBNAME): $(libnotmuch_modules) util/libnotmuch_util.a parse-time-string/libparse-time-string.a
-	$(call quiet,CXX $(CXXFLAGS)) $(libnotmuch_modules) $(FINAL_LIBNOTMUCH_LDFLAGS) $(LIBRARY_LINK_FLAG) -o $@ util/libnotmuch_util.a parse-time-string/libparse-time-string.a
+	$(call quiet,CXX $(CXXFLAGS)) $(libnotmuch_modules) $(FINAL_LIBNOTMUCH_LDFLAGS) $(CONFIGURE_LDFLAGS) $(LIBRARY_LINK_FLAG) -o $@ util/libnotmuch_util.a parse-time-string/libparse-time-string.a
 
 $(dir)/$(SONAME): $(dir)/$(LIBNAME)
 	ln -sf $(LIBNAME) $@
-- 
2.13.3

_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: