Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160223204548.GQ9349@brightrain.aerifal.cx>
Date: Tue, 23 Feb 2016 15:45:48 -0500
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] fix unresolved symbol issues on ARMv7 due to
 raise/divmod dependency

On Tue, Feb 23, 2016 at 09:43:37PM +0100, Szabolcs Nagy wrote:
> * Dima Krasner <dima@...akrasner.com> [2016-02-23 22:21:20 +0200]:
> > Similar to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31798
> > 
> > Signed-off-by: Dima Krasner <dima@...akrasner.com>
> > ---
> >  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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.