From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:f42::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yLG8LYARxmF+XgAAgWs5BA (envelope-from ) for ; Fri, 24 Dec 2021 19:29:20 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id AN1rKoARxmF/xQAAauVa8A (envelope-from ) for ; Fri, 24 Dec 2021 19:29:20 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F13FCD128 for ; Fri, 24 Dec 2021 19:29:19 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 499705F71E; Fri, 24 Dec 2021 18:29:15 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 248045F715 for ; Fri, 24 Dec 2021 18:29:13 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 0BA575FC42; Fri, 24 Dec 2021 13:29:12 -0500 (EST) Received: (nullmailer pid 2353758 invoked by uid 1000); Fri, 24 Dec 2021 18:29:11 -0000 From: David Bremner To: Tomi Ollila , David Bremner , Ryan Schmidt , notmuch@notmuchmail.org Subject: [PATCH 1/3] build: move LDFLAGS after notmuch libraries. Date: Fri, 24 Dec 2021 14:29:03 -0400 Message-Id: <20211224182905.2353744-1-david@tethera.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: 3OCWITYKFEBCVQ57ICTXLSLGKKISF4TK X-Message-ID-Hash: 3OCWITYKFEBCVQ57ICTXLSLGKKISF4TK X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640370560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=L5URf01lIS0a0chce32IEh74YjyuQ810+ZPI7N9mHww=; b=h85chgoMyh8L4OLpRDL8jlt+uDWjy+zjy+ejLNJakfMkVN3vsCO980CMIZvDiUsz44Di43 ZHUZDQeln3lVALboX1boCk77CaqfoJf4sQh+IwWvIodtbMwTIkL3bnZicCCDOUU1raaQvA OBsrFktUoa8d0oY63LAEzyFaCp+FBquuI0u8y2zBK3x+MRMBWrFRCo+Wr6x+7OiQNNpd/+ Th//QYP2Jf4eAr1GkjWVcx5OQ3EeizwO4PZ6YpYY/uoWSRNauv7Qz9slVGjZ6CiXthySod MIAsUsy/aDmmW2BYNbGbPdux4VcIsElkZoSHWq2nn6mVgsJOlL435PN/Q32FBA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640370560; a=rsa-sha256; cv=none; b=kzakAGalmj7eaJ8yGozVzcODIiI/kZc6ljJIJblfhRjcusg09ykxCliDlc3+kG2T727D2Y KlQ0YKJuuQOZfWpDcbKY7kOT/ZPlKDeZHFCYxBmOeMkVAdJRWAaLjWmjGFHiTNd9/sbLnc 48PD5889qnmaiGxgK11Jgolutv53VGH5Fb32k54ROCgEB+LPZYDe5lRtVdFQoOGpTgCukt /crOZHhtazip28/0MyEWxvXBJKNqM0eYEVXBDITs6PNqdOJdKnvp0jZNePzUwfpzDaK8yh n5P643KRl0Ru5x9t0L0yz+5VsJfxMcmtxIP5vr1M3csccBxbxOGoxlscbb595g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.72 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: F13FCD128 X-Spam-Score: -0.72 X-Migadu-Scanner: scn0.migadu.com X-TUID: Ir33iOT7w8ci In [1] Ryan Schmidt reported a problem on macports [2] with notmuch finding an existing installed version of libnotmuch during the build when the user specified LDFLAGS including the libnotmuch install directory. This change should prevent that. LDFLAGS also occurs in FINAL_LIBNOTMUCH_LDFLAGS. The only built library linked to that is util/libtnotmuch_util.a, and that passed as explicit (relative) path, and is thus not affected by -L. [1]: id:7851CAB5-4556-4931-A0A2-37003E56C927@ryandesign.com [2]: The problem does not arise when libnotmuch is installed into a "system" library path that the compiler/linker searches by default. --- Makefile.global | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.global b/Makefile.global index fe79121d..e6b00815 100644 --- a/Makefile.global +++ b/Makefile.global @@ -52,7 +52,7 @@ PV_FILE=bindings/python/notmuch/version.py # Smash together user's values with our extra values FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CPPFLAGS) $(CFLAGS) $(WARN_CFLAGS) $(extra_cflags) $(CONFIGURE_CFLAGS) FINAL_CXXFLAGS = $(CPPFLAGS) $(CXXFLAGS) $(WARN_CXXFLAGS) $(extra_cflags) $(extra_cxxflags) $(CONFIGURE_CXXFLAGS) -FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lnotmuch_util -Llib -lnotmuch +FINAL_NOTMUCH_LDFLAGS = -Lutil -lnotmuch_util -Llib -lnotmuch $(LDFLAGS) ifeq ($(LIBDIR_IN_LDCONFIG),0) FINAL_NOTMUCH_LDFLAGS += $(RPATH_LDFLAGS) endif -- 2.34.1