From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11075 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] musl-gcc.spec: honour $LIBRARY_PATH / $LPATH Date: Wed, 22 Feb 2017 16:11:58 -0500 Message-ID: <20170222211158.GU1520@brightrain.aerifal.cx> References: <1487797025-32177-1-git-send-email-minipli@googlemail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1487797939 7645 195.159.176.226 (22 Feb 2017 21:12:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 22 Feb 2017 21:12:19 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-11090-gllmg-musl=m.gmane.org@lists.openwall.com Wed Feb 22 22:12:15 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1cgeCl-00011V-82 for gllmg-musl@m.gmane.org; Wed, 22 Feb 2017 22:12:07 +0100 Original-Received: (qmail 7169 invoked by uid 550); 22 Feb 2017 21:12:10 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 6127 invoked from network); 22 Feb 2017 21:12:10 -0000 Content-Disposition: inline In-Reply-To: <1487797025-32177-1-git-send-email-minipli@googlemail.com> Xref: news.gmane.org gmane.linux.lib.musl.general:11075 Archived-At: On Wed, Feb 22, 2017 at 09:57:05PM +0100, Mathias Krause wrote: > To support additional library search paths via $LIBRARY_PATH / $LPATH > extend the link_libgcc variable instead of replacing it. The original > one will contain the required "%D" to support this. > > musl's library path is still the first in the list, so its object files > will be found before other paths are taken into account. > > Signed-off-by: Mathias Krause > --- > tools/musl-gcc.specs.sh | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/tools/musl-gcc.specs.sh b/tools/musl-gcc.specs.sh > index 294e24f75503..819799a6d5a7 100644 > --- a/tools/musl-gcc.specs.sh > +++ b/tools/musl-gcc.specs.sh > @@ -10,8 +10,10 @@ cat < *cc1: > %(cc1_cpu) -nostdinc -isystem $incdir -isystem include%s > > +%rename link_libgcc old_link_libgcc > + > *link_libgcc: > --L$libdir -L .%s > +-L$libdir %(old_link_libgcc) I'm pretty sure this is wrong. What are you trying to achieve? The whole point of musl-gcc is to _remove_ any existing library paths since, if present, they will cause configure scripts to detect and link to incompatible libraries (linked against glibc). The only library path we want to preserve is the one to libgcc. Rich