On Thursday 04 October 2007 23:31, Jate Sujjavanich wrote:
> I've recently switched from gcc 3.4.0 to gcc 4.2-8 (codesourcery) for
> shared library support on the Coldfire. It seems this has broken two
> things: recognition of the ! inside of braces [], and messed with
> variable substitution inside of backticks.
>  
> This fails: [ $i -lt 10 -a ! -e /var/snap_state ]. I can get rid of the
> ! and it works properly.
> 
> If I do 
>  
> echo `expr $i + 1`
>  
> expr returns a syntax error. Running it as a regular command is
> successful.

Does it happen to you when you build bbox with same .config but
on i386 desktop? If yes, please send me .config.

For me it works:

$ ./busybox msh
:/usr/local/google/vda/srcdev/bbox/fix/busybox.t3$ echo `expr $i + 1`
1
:/usr/local/google/vda/srcdev/bbox/fix/busybox.t3$ exit

$ gcc -v
Using built-in specs.
Target: i386-pc-linux-gnu
Configured with: ../gcc-4.2.1.div/configure --prefix=/usr/app/gcc-4.2.1.div 
--exec-prefix=/usr/app/gcc-4.2.1.div --bindir=/usr/bin --sbindir=/usr/sbin 
--libexecdir=/usr/app/gcc-4.2.1.div/libexec 
--datadir=/usr/app/gcc-4.2.1.div/share --sysconfdir=/etc 
--sharedstatedir=/usr/app/gcc-4.2.1.div/var/com 
--localstatedir=/usr/app/gcc-4.2.1.div/var --libdir=/usr/lib 
--includedir=/usr/include --infodir=/usr/info --mandir=/usr/man 
--with-slibdir=/usr/app/gcc-4.2.1.div/lib --with-local-prefix=/usr/local 
--with-gxx-include-dir=/usr/app/gcc-4.2.1.div/include/g++-v3 
--enable-languages=c,c++ --without-system-zlib --disable-nls 
--enable-threads=posix i386-pc-linux-gnu
Thread model: posix
gcc version 4.2.1

(my .config is attached)

> I am trying to find out which part of busybox/shell/msh.c to debug from
> someone who is more familiar with the code. Thanks.

When you try to find someone familiar with shell source (any shell),
people tend to duck and run.

I'm afraid you are pretty much limited to sticking debug
prints / watching things under debugger until you see
where msh starts to act differently with different gcc.
--
vda

Attachment: .config.bz2
Description: BZip2 compressed data

_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to