[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cross compile crapout

From: Chet Ramey
Subject: Re: Cross compile crapout
Date: Mon, 23 Jan 2012 20:30:24 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0

On 1/23/12 1:12 AM, Jonathan Andrews wrote:

> I needed a statically linked bash for testing an arm board. I did not
> expect it to be nearly 3MB though ! It surprises me that a statically
> linked bash is bigger than the entire busybox binary i've compiled, or
> my kernel image for that matter. Is this bloat gcc, some failing of the
> linker or bash itself?  

That's probably the size of the C library on your machine.  The only
difference between a static bash and a `normal' bash is that the system
libraries are linked in instead of being dynamically linked at run time.

I built a minimal bash (--enable-minimal-config) on my machine (Mac OS X,
where static linking isn't possible), and it ended up being about half
as big as a bash-4.2.20 build.  I had to fix a few things to do it.


``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]