From unknown Sat Aug 16 22:45:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34925: Overwriting target_LDFLAGS within conditionals Resent-From: =?UTF-8?Q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD_?= =?UTF-8?Q?=D0=9F=D0=B0=D0=BB=D0=B0=D1=83=D0=B7=D0=BE=D0=B2?= Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Wed, 20 Mar 2019 17:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34925 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: 34925@debbugs.gnu.org X-Debbugs-Original-To: bug-automake@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155310308424697 (code B ref -1); Wed, 20 Mar 2019 17:32:02 +0000 Received: (at submit) by debbugs.gnu.org; 20 Mar 2019 17:31:24 +0000 Received: from localhost ([127.0.0.1]:52130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h6f3k-0006QH-H6 for submit@debbugs.gnu.org; Wed, 20 Mar 2019 13:31:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h6f3i-0006Q4-Ei for submit@debbugs.gnu.org; Wed, 20 Mar 2019 13:31:23 -0400 Received: from lists.gnu.org ([209.51.188.17]:50190) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h6f3d-0002Pm-6W for submit@debbugs.gnu.org; Wed, 20 Mar 2019 13:31:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6f3c-00076N-Ab for bug-automake@gnu.org; Wed, 20 Mar 2019 13:31:16 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,RCVD_IN_DNSWL_NONE, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h6eyj-00047V-Ha for bug-automake@gnu.org; Wed, 20 Mar 2019 13:26:19 -0400 Received: from mail.aegee.org ([144.76.142.78]:33162) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h6eyi-000421-RN for bug-automake@gnu.org; Wed, 20 Mar 2019 13:26:13 -0400 Authentication-Results: mail.aegee.org/x2KHQAne021089; auth=pass (PLAIN) smtp.auth=didopalauzov DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aegee.org; s=k4096; t=1553102770; i=dkim+MSA-tls@aegee.org; r=y; bh=R/+Bz6vlJGRI+RGtvCxpTQJnUhZIFKy7g28fYtSBmPU=; h=Subject:From:To:Date; b=lPyMcYDeHWwo7wzKGioO9S4mAwF8XOIX2SB/keq6LxS4dYcG3mKGRMbA84CftZUpd L+bAJ2TvmaqfgAVjYOyvDDi948+m9kJc05tNF1wQCnnBGJPKEMZGNTCcwlvER79ygD OvVfHMy1/f/yDmU2nXuj6yATdmG6e/AtTUQ/Oz+sQ7Y5IxT2q4AozvUZdjtB8zlp+D x0MicbOZIPxGcelciurVxeA1IG25w2f2WOUxSJTbo9n6ULQoJdd4HCLBRXGNvggxYQ n5eaTfhNNxdOWq+E3JVRl5ZYRmvnb1oSpERV64UBjIGzNgKLBaM0GZXTj8Bqhxn+/f u9C0l2xZJjyU2f2v4h0lHeFychbh/znQX+gbKJ7iC6P7nkrk5nMNvZs7uwTTp6EXSf YQPYIg1OzHkt+NPm23FTc7nRh5ChdYppET05P2tW2IZWgWr4vab204adYmBGeeF/Zf mWgZE6tp3FR0Q0wux70Xpx752LqyX+MCkTTruFZyIL5pW6hHogUQDdEBj31DDKueJX ALQHg+Vv4vYY7ZLAhUxWRqnm51Eyybf/AcPLrev/5u5rjlhZiFjoCO+iujcYbpADNI dbKSAL7+h6+2vLdggLbcVf7Q53/iJnVkZMxXEMKIuyVUAbJZtwMFu5KV9TupyQSU1l 7acWBBNSZ3ly7Hp4VrYzIf3A= Authentication-Results: mail.aegee.org/x2KHQAne021089; dkim=none Received: from Tylan (eduroam-PAT.sit.fraunhofer.de [141.12.129.132]) (authenticated bits=0) by mail.aegee.org (8.15.2/8.15.2) with ESMTPSA id x2KHQAne021089 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Wed, 20 Mar 2019 17:26:10 GMT Message-ID: <8e12bd8c09812b4bd87d884228c4a440a76c3c32.camel@aegee.org> From: =?UTF-8?Q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD_?= =?UTF-8?Q?=D0=9F=D0=B0=D0=BB=D0=B0=D1=83=D0=B7=D0=BE=D0=B2?= Date: Wed, 20 Mar 2019 17:26:08 +0000 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.33.1 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.101.1 at mail.aegee.org X-Virus-Status: Clean Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mail.aegee.org id x2KHQAne021089 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 144.76.142.78 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, my reading of the automake manual is that for an AM_CONDITIONAL Z AM_LDFLAGS =3D -flto if Z a_LDFLAGS =3D -O3 endif means: if Z is defined, a_LDFLAGS is used and AM_LDFLAGS are not used. if Z is not defined, a_LDFLAGS is absent and AM_LDFLAGS are used. But looking in Makefile.in the code looks like this: @Z_TRUE@a_LDFLAGS =3D -O3 a_LINK =3D $(LIBTOOL) $(AM_V_lt) --tag=3DCC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=3Dlink $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(a_LDFLAGS) $(LDFLAGS) -o $@ which means, that AM_LDFLAGS is always ignored. The manual says in =E2=80=9CProgram and Library Variables=E2=80=9D: =E2=80=98maude_LDFLAGS=E2=80=99 This variable is used to pass extra flags to the link step of a program or a shared library. It overrides the =E2=80=98AM_LDFLAGS=E2= =80=99 variable. Regards =D0=94=D0=B8=D0=BB=D1=8F=D0=BD From unknown Sat Aug 16 22:45:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34925: Overwriting target_LDFLAGS within conditionals References: <8e12bd8c09812b4bd87d884228c4a440a76c3c32.camel@aegee.org> Resent-From: Karl Berry Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Tue, 23 Feb 2021 02:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34925 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: dilyan.palauzov@aegee.org Cc: 34925@debbugs.gnu.org Received: via spool by 34925-submit@debbugs.gnu.org id=B34925.16140470865958 (code B ref 34925); Tue, 23 Feb 2021 02:25:01 +0000 Received: (at 34925) by debbugs.gnu.org; 23 Feb 2021 02:24:46 +0000 Received: from localhost ([127.0.0.1]:57976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lENNW-0001Y2-0J for submit@debbugs.gnu.org; Mon, 22 Feb 2021 21:24:46 -0500 Received: from freefriends.org ([96.88.95.60]:58830) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lENNT-0001Xq-OB for 34925@debbugs.gnu.org; Mon, 22 Feb 2021 21:24:44 -0500 X-Envelope-From: karl@freefriends.org Received: from freefriends.org (freefriends.org [96.88.95.60]) by freefriends.org (8.14.7/8.14.7) with ESMTP id 11N2NfiC025689 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Feb 2021 19:23:42 -0700 Received: (from apache@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 11N2NeTW025674; Mon, 22 Feb 2021 19:23:40 -0700 Date: Mon, 22 Feb 2021 19:23:40 -0700 Message-Id: <202102230223.11N2NeTW025674@freefriends.org> From: Karl Berry In-Reply-To: <8e12bd8c09812b4bd87d884228c4a440a76c3c32.camel@aegee.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi - replying to this automake bug report from almost two years ago (sorry) (https://bugs.gnu.org/34925): AM_LDFLAGS = -flto if Z a_LDFLAGS = -O3 endif ... AM_LDFLAGS is always ignored. I agree that in the case above it's surprising for AM_LDFLAGS not to be used. But I worry about changing Automake's behavior at this late date. The whole question of which ldflags are used is something that different projects might have carefully tuned to the current behavior for their needs, and thus newly "inheriting" the AM_LDFLAGS value would cause unnecessary problems. For the case above, presumably an else clause defining a_LDFLAGS would yield the desired result. So instead of changing the code, I merely changed the manual to warn about this. Thanks for the report. --best, karl. diff --git a/doc/automake.texi b/doc/automake.texi index 5f70e37..8f5a9fc 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -5839,7 +5839,11 @@ of any library built by your package. Doing so will ensure that @item maude_LDFLAGS This variable is used to pass extra flags to the link step of a program -or a shared library. It overrides the @code{AM_LDFLAGS} variable. +or a shared library. It overrides the @code{AM_LDFLAGS} variable, +even if it is defined only in a false branch of a conditional; in +other words, if @code{@var{prog}_LDFLAGS} is defined at all, +@code{AM_LDFLAGS} will not be used. +@c https://bugs.gnu.org/34925 @item maude_LIBTOOLFLAGS This variable is used to pass extra options to @command{libtool}. compile finished at Mon Feb 22 18:19:56 2021 From unknown Sat Aug 16 22:45:53 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: =?UTF-8?Q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD_?= =?UTF-8?Q?=D0=9F=D0=B0=D0=BB=D0=B0=D1=83=D0=B7=D0=BE=D0=B2?= Subject: bug#34925: closed () Message-ID: References: <202102232231.11NMVPak002438@freefriends.org> <8e12bd8c09812b4bd87d884228c4a440a76c3c32.camel@aegee.org> X-Gnu-PR-Message: they-closed 34925 X-Gnu-PR-Package: automake Reply-To: 34925@debbugs.gnu.org Date: Tue, 23 Feb 2021 22:32:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1614119522-9404-1" This is a multi-part message in MIME format... ------------=_1614119522-9404-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #34925: Overwriting target_LDFLAGS within conditionals which was filed against the automake package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 34925@debbugs.gnu.org. --=20 34925: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D34925 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1614119522-9404-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 34925-done) by debbugs.gnu.org; 23 Feb 2021 22:31:29 +0000 Received: from localhost ([127.0.0.1]:60832 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEgDI-0002Qi-RF for submit@debbugs.gnu.org; Tue, 23 Feb 2021 17:31:29 -0500 Received: from freefriends.org ([96.88.95.60]:52790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEgDH-0002QX-2n for 34925-done@debbugs.gnu.org; Tue, 23 Feb 2021 17:31:27 -0500 X-Envelope-From: karl@freefriends.org X-Envelope-To: <34925-done@debbugs.gnu.org> Received: from freefriends.org (freefriends.org [96.88.95.60]) by freefriends.org (8.14.7/8.14.7) with ESMTP id 11NMVPw8002439 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <34925-done@debbugs.gnu.org>; Tue, 23 Feb 2021 15:31:26 -0700 Received: (from apache@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 11NMVPak002438; Tue, 23 Feb 2021 15:31:25 -0700 Date: Tue, 23 Feb 2021 15:31:25 -0700 Message-Id: <202102232231.11NMVPak002438@freefriends.org> From: Karl Berry To: 34925-done@debbugs.gnu.org Subject: X-Spam-Score: 3.4 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Content analysis details: (3.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [96.88.95.60 listed in list.dnswl.org] 2.0 BLANK_SUBJECT Subject is present but empty 2.3 EMPTY_MESSAGE Message appears to have no textual parts and no Subject: text 1.4 BODY_EMPTY No body text in message X-Debbugs-Envelope-To: 34925-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.4 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Content analysis details: (2.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [96.88.95.60 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 2.0 BLANK_SUBJECT Subject is present but empty -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 2.3 EMPTY_MESSAGE Message appears to have no textual parts and no Subject: text 1.4 BODY_EMPTY No body text in message ------------=_1614119522-9404-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 20 Mar 2019 17:31:24 +0000 Received: from localhost ([127.0.0.1]:52130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h6f3k-0006QH-H6 for submit@debbugs.gnu.org; Wed, 20 Mar 2019 13:31:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h6f3i-0006Q4-Ei for submit@debbugs.gnu.org; Wed, 20 Mar 2019 13:31:23 -0400 Received: from lists.gnu.org ([209.51.188.17]:50190) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h6f3d-0002Pm-6W for submit@debbugs.gnu.org; Wed, 20 Mar 2019 13:31:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6f3c-00076N-Ab for bug-automake@gnu.org; Wed, 20 Mar 2019 13:31:16 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,RCVD_IN_DNSWL_NONE, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h6eyj-00047V-Ha for bug-automake@gnu.org; Wed, 20 Mar 2019 13:26:19 -0400 Received: from mail.aegee.org ([144.76.142.78]:33162) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h6eyi-000421-RN for bug-automake@gnu.org; Wed, 20 Mar 2019 13:26:13 -0400 Authentication-Results: mail.aegee.org/x2KHQAne021089; auth=pass (PLAIN) smtp.auth=didopalauzov DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aegee.org; s=k4096; t=1553102770; i=dkim+MSA-tls@aegee.org; r=y; bh=R/+Bz6vlJGRI+RGtvCxpTQJnUhZIFKy7g28fYtSBmPU=; h=Subject:From:To:Date; b=lPyMcYDeHWwo7wzKGioO9S4mAwF8XOIX2SB/keq6LxS4dYcG3mKGRMbA84CftZUpd L+bAJ2TvmaqfgAVjYOyvDDi948+m9kJc05tNF1wQCnnBGJPKEMZGNTCcwlvER79ygD OvVfHMy1/f/yDmU2nXuj6yATdmG6e/AtTUQ/Oz+sQ7Y5IxT2q4AozvUZdjtB8zlp+D x0MicbOZIPxGcelciurVxeA1IG25w2f2WOUxSJTbo9n6ULQoJdd4HCLBRXGNvggxYQ n5eaTfhNNxdOWq+E3JVRl5ZYRmvnb1oSpERV64UBjIGzNgKLBaM0GZXTj8Bqhxn+/f u9C0l2xZJjyU2f2v4h0lHeFychbh/znQX+gbKJ7iC6P7nkrk5nMNvZs7uwTTp6EXSf YQPYIg1OzHkt+NPm23FTc7nRh5ChdYppET05P2tW2IZWgWr4vab204adYmBGeeF/Zf mWgZE6tp3FR0Q0wux70Xpx752LqyX+MCkTTruFZyIL5pW6hHogUQDdEBj31DDKueJX ALQHg+Vv4vYY7ZLAhUxWRqnm51Eyybf/AcPLrev/5u5rjlhZiFjoCO+iujcYbpADNI dbKSAL7+h6+2vLdggLbcVf7Q53/iJnVkZMxXEMKIuyVUAbJZtwMFu5KV9TupyQSU1l 7acWBBNSZ3ly7Hp4VrYzIf3A= Authentication-Results: mail.aegee.org/x2KHQAne021089; dkim=none Received: from Tylan (eduroam-PAT.sit.fraunhofer.de [141.12.129.132]) (authenticated bits=0) by mail.aegee.org (8.15.2/8.15.2) with ESMTPSA id x2KHQAne021089 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Wed, 20 Mar 2019 17:26:10 GMT Message-ID: <8e12bd8c09812b4bd87d884228c4a440a76c3c32.camel@aegee.org> Subject: Overwriting target_LDFLAGS within conditionals From: =?UTF-8?Q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD_?= =?UTF-8?Q?=D0=9F=D0=B0=D0=BB=D0=B0=D1=83=D0=B7=D0=BE=D0=B2?= To: bug-automake@gnu.org Date: Wed, 20 Mar 2019 17:26:08 +0000 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.33.1 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.101.1 at mail.aegee.org X-Virus-Status: Clean Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mail.aegee.org id x2KHQAne021089 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 144.76.142.78 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, my reading of the automake manual is that for an AM_CONDITIONAL Z AM_LDFLAGS =3D -flto if Z a_LDFLAGS =3D -O3 endif means: if Z is defined, a_LDFLAGS is used and AM_LDFLAGS are not used. if Z is not defined, a_LDFLAGS is absent and AM_LDFLAGS are used. But looking in Makefile.in the code looks like this: @Z_TRUE@a_LDFLAGS =3D -O3 a_LINK =3D $(LIBTOOL) $(AM_V_lt) --tag=3DCC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=3Dlink $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(a_LDFLAGS) $(LDFLAGS) -o $@ which means, that AM_LDFLAGS is always ignored. The manual says in =E2=80=9CProgram and Library Variables=E2=80=9D: =E2=80=98maude_LDFLAGS=E2=80=99 This variable is used to pass extra flags to the link step of a program or a shared library. It overrides the =E2=80=98AM_LDFLAGS=E2= =80=99 variable. Regards =D0=94=D0=B8=D0=BB=D1=8F=D0=BD ------------=_1614119522-9404-1--