From unknown Fri Jun 20 18:06:25 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#21941 <21941@debbugs.gnu.org> To: bug#21941 <21941@debbugs.gnu.org> Subject: Status: ld-wrapper incorrectly computes library search path Reply-To: bug#21941 <21941@debbugs.gnu.org> Date: Sat, 21 Jun 2025 01:06:25 +0000 retitle 21941 ld-wrapper incorrectly computes library search path reassign 21941 guix submitter 21941 ludo@gnu.org (Ludovic Court=C3=A8s) severity 21941 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 17 11:43:32 2015 Received: (at submit) by debbugs.gnu.org; 17 Nov 2015 16:43:32 +0000 Received: from localhost ([127.0.0.1]:41930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZyjLv-0003hr-Ez for submit@debbugs.gnu.org; Tue, 17 Nov 2015 11:43:31 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49590) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZyjLt-0003hf-9p for submit@debbugs.gnu.org; Tue, 17 Nov 2015 11:43:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyjLs-0005ij-8Z for submit@debbugs.gnu.org; Tue, 17 Nov 2015 11:43:28 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:41362) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyjLs-0005if-60 for submit@debbugs.gnu.org; Tue, 17 Nov 2015 11:43:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyjLr-0006ta-F8 for bug-guix@gnu.org; Tue, 17 Nov 2015 11:43:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyjLk-0005ez-RF for bug-guix@gnu.org; Tue, 17 Nov 2015 11:43:23 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38322) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyjLk-0005ev-OB for bug-guix@gnu.org; Tue, 17 Nov 2015 11:43:20 -0500 Received: from pluto.bordeaux.inria.fr ([193.50.110.57]:39246 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1ZyjLk-0002ew-27 for bug-guix@gnu.org; Tue, 17 Nov 2015 11:43:20 -0500 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: bug-guix@gnu.org Subject: ld-wrapper incorrectly computes library search path X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 27 Brumaire an 224 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x3D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Tue, 17 Nov 2015 17:43:18 +0100 Message-ID: <87ziyc60gp.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.6 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -5.6 (-----) Currently =E2=80=98ld-wrapper=E2=80=99 builds the library search path as it= encounters -L flags and uses the current search path when it encounters a -l flag. This is contrary to what ld actually does (info "(ld) Options"): --8<---------------cut here---------------start------------->8--- `-L SEARCHDIR' `--library-path=3DSEARCHDIR' [=E2=80=A6] All `-L' options apply to all `-l' options, regardless of the order in which the options appear. --8<---------------cut here---------------end--------------->8--- This turns out to be fine when using GCC but manifests itself when using Clang, because Clang passes the -L flags that correspond to =E2=80=98LIBRARY_PATH=E2=80=99 after the -l flags on the =E2=80=98ld=E2=80= =99 command line. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 28 16:12:56 2015 Received: (at 21941-done) by debbugs.gnu.org; 28 Nov 2015 21:12:57 +0000 Received: from localhost ([127.0.0.1]:58471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a2mng-0000VZ-GL for submit@debbugs.gnu.org; Sat, 28 Nov 2015 16:12:56 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34328) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a2mnM-0000V6-Qw for 21941-done@debbugs.gnu.org; Sat, 28 Nov 2015 16:12:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a2mnH-00045s-Mo for 21941-done@debbugs.gnu.org; Sat, 28 Nov 2015 16:12:36 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2mnH-00045o-KP for 21941-done@debbugs.gnu.org; Sat, 28 Nov 2015 16:12:31 -0500 Received: from reverse-83.fdn.fr ([80.67.176.83]:48796 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1a2mnG-0005vr-Me for 21941-done@debbugs.gnu.org; Sat, 28 Nov 2015 16:12:31 -0500 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: 21941-done@debbugs.gnu.org Subject: Re: bug#21941: ld-wrapper incorrectly computes library search path References: <87ziyc60gp.fsf@gnu.org> Date: Sat, 28 Nov 2015 22:12:28 +0100 In-Reply-To: <87ziyc60gp.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 17 Nov 2015 17:43:18 +0100") Message-ID: <87si3prfpf.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 21941-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -5.0 (-----) ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > Currently =E2=80=98ld-wrapper=E2=80=99 builds the library search path as = it encounters > -L flags and uses the current search path when it encounters a -l flag. > > This is contrary to what ld actually does (info "(ld) Options"): > > `-L SEARCHDIR' > `--library-path=3DSEARCHDIR' > [=E2=80=A6] All `-L' options apply to all `-l' options, > regardless of the order in which the options appear. Fixed in e946b609. Ludo=E2=80=99. From unknown Fri Jun 20 18:06:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 27 Dec 2015 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator