Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130408033223.GJ20323@brightrain.aerifal.cx>
Date: Sun, 7 Apr 2013 23:32:23 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: Building libc separately from libm,librt,libpthread and
 others

On Sun, Apr 07, 2013 at 05:43:11PM +0300, Timerlan Moldobaev wrote:
> Hi,
> 
> Can you please help with reducing the size of statically linked libc.a
> library ?
> Whereas the comparison table located in
> http://www.etalabs.net/compare_libcs.html
> claims the size of complete .a set as 333k, I got around 2M while building
> the library on x86_64 with gcc version 4.1.1.
> I suppose that might be caused by including in libc.a  object files that
> belong to libm, librt, libpthread and others.
> Am I right ?
> Is there any way to compile libc.a solely ?

What is your goal in getting it smaller? With static linking, only the
object files needed by a program end up in the resulting binary, so
compiling less will not make your binaries any smaller. The only
benefits I can think of are (1) reducing time to compile musl, and (2)
storing the development files on an extremely small storage device. If
you tell us what you're trying to do, we can offer better advice on
how to meet your needs.

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.