bug-bash
[Top][All Lists]
Advanced

[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: Tue, 24 Jan 2012 08:09:26 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0

On 1/23/12 10:17 PM, Jonathan Andrews wrote:

> Im not a gcc expect, I thought the idea of the linker was also to drop
> unused code but this seems not to be true with gcc as default.

Sure, but it's the difference between all of the libc functions you use
and none of them, not what you use from libc and what you don't.

> 
> http://www.google.com/url?sa=t&rct=j&q=gcc%20linker%20unused%20code&source=web&cd=5&ved=0CEYQFjAE&url=http%3A%2F%2Felinux.org%2Fimages%2F2%2F2d%2FELC2010-gc-sections_Denys_Vlasenko.pdf&ei=Tx8eT5mUGczRswaZju3eDA&usg=AFQjCNF3miTnzqYNsiiyei_SQDlDxG10TQ&cad=rja
> 
> http://gcc.gnu.org/ml/gcc-help/2003-08/msg00128.html
> 
> I've been trying to compile bash static with the extra parameters, no
> joy so far - finger trouble on my part I expect.
> 
> 
>> 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.
> Maybe this is one of the things ?

It is.  Just comment out the goto as a quick fix.

> 
> I've applied the patches, tried this :
> 
> (script)
> export CC=arm-softfloat-linux-gnu-gcc
> ./configure --build=i386-linux --host=arm-linux --enable-static-link 
> --without-bash-malloc --enable-minimal-config
> make
> 
> 
> Get this :
> 
> arm-softfloat-linux-gnu-gcc  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"arm"' 
> -DCONF_OSTYPE='"linux-gnu"' -DCONF_MACHTYPE='"arm-unknown-linux-gnu"' 
> -DCONF_VENDOR='"unknown"' -DLOCALEDIR='"/usr/local/share/locale"' 
> -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   
> -g -O2 -c y.tab.c
> ./parse.y: In function 'shell_getc':
> ./parse.y:2399: error: label 'pop_alias' used but not defined
> make: *** [y.tab.o] Error 1

There are a few cases like this that prevent a minimally-configured
bash from building.  In this case, it's that there is a `goto pop_alias'
but the pop_alias label is protected by an #ifdef.

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



reply via email to

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