From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9373 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] fix unresolved symbol issues on ARMv7 due to raise/divmod dependency Date: Tue, 23 Feb 2016 15:45:48 -0500 Message-ID: <20160223204548.GQ9349@brightrain.aerifal.cx> References: <20160223222120.253fa62ba0205776c235c22a@dimakrasner.com> <20160223204337.GB29662@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1456260377 32409 80.91.229.3 (23 Feb 2016 20:46:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Feb 2016 20:46:17 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9386-gllmg-musl=m.gmane.org@lists.openwall.com Tue Feb 23 21:46:11 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1aYJqO-0004op-TU for gllmg-musl@m.gmane.org; Tue, 23 Feb 2016 21:46:05 +0100 Original-Received: (qmail 32179 invoked by uid 550); 23 Feb 2016 20:46:01 -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 32158 invoked from network); 23 Feb 2016 20:46:01 -0000 Content-Disposition: inline In-Reply-To: <20160223204337.GB29662@port70.net> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:9373 Archived-At: On Tue, Feb 23, 2016 at 09:43:37PM +0100, Szabolcs Nagy wrote: > * Dima Krasner [2016-02-23 22:21:20 +0200]: > > Similar to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31798 > > > > Signed-off-by: Dima Krasner > > --- > > tools/ld.musl-clang.in | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/tools/ld.musl-clang.in b/tools/ld.musl-clang.in > > index 93763d6..bb6cbaf 100644 > > --- a/tools/ld.musl-clang.in > > +++ b/tools/ld.musl-clang.in > > @@ -48,4 +48,5 @@ for x ; do > > esac > > done > > > > -exec $($cc -print-prog-name=ld) -nostdlib "$@" -lc -dynamic-linker "$ldso" > > +lgcc=$($cc -print-file-name=libgcc.a) > > +exec $($cc -print-prog-name=ld) -nostdlib "$@" --as-needed $lgcc --no-as-needed -lc --as-needed $lgcc --no-as-needed -dynamic-linker "$ldso" > > this workaround should be only done if clang uses libgcc > (and not compiler_rt) The --as-needed stuff is also not needed; it's a nop for static libraries, which -lgcc always is. But I'm unclear why this patch is needed to begin with, and why -lc was there already. The compiler should be passing in the right -l options. Rich