Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150428002402.GJ17573@brightrain.aerifal.cx>
Date: Mon, 27 Apr 2015 20:24:02 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: building musl libc.so with gcc -flto

On Mon, Apr 27, 2015 at 05:16:12PM -0700, Andre McCurdy wrote:
> > OK, it looks like the _dlstart_c symbol got removed before linking the
> > asm. What about selectively compiling this file with -fno-lto via
> > something like this in config.mak:
> >
> > src/ldso/dlstart.lo: CFLAGS += -fno-lto
> 
> That works. Should I send a patch?

Yes, but configure would need to detect support for -fno-lto and add
it appropriately. See what's done for CFLAGS_NOSSP. I suspect the crt
files also need -fno-lto in principle even if they're not currently
breaking for lack of it.

> >> > Also seems rather like what I would expect. Any idea if performance is
> >> > significantly better? It's not very comprehensive but you could try
> >> > libc-bench.
> >>
> >> I modified libc-bench so that it loops though everything in main() ten
> >> times and then ran the same libc-bench binary with each version of
> >> libc.so, sending output to /dev/null.
> >>
> >> The -O3 -flto build seems to be consistently very slightly *slower*
> >> than the non -flto version...
> >
> > That makes the whole thing somewhat less interesting. LTO is probably
> > more interesting for static libc.
> 
> Yes, quite disappointing...
> 
> I'll try to experiment a little with static linking.

Great. Let us know how it goes.

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.