I have been trying to run busybox-1.00  ( also rc3)   on my powerpc board (MPC 
8540 processor ) and about half
the applets do not run and die with the message "Illegal instruction".  I have 
ppc_82xx-gcc Montavista compiler 
for the power pc board.  These compilers are cross compiled version of gcc 
3.3.1 compiler.  We are using the 
cross compiled glibc-2.3.2.
 
Some critical applets which are failing with Illegal instruction message are :
 
ar ash bunzip2 bzcat cat chgrp chown cmp cp cpio crond install ln ls mkdir tty 
wc cut date df du
egrep env expr fgrep find modprobe mount  rm rmdir route uname wget ftpget 
ftpput grep gunzip
halt head httpd id ifconfig inetd sh sort syslogd uniq xargs tee telnetd touch 
tr vi yes zcat.
 
About half the commands are broken.  When I compile with no optimization or 
optimize for speed i.e. -O2
instead for size -Os, everything works fine. 

Seems like an optimzation bug to me.

--
Atul

The configure command for cross compiling gcc was as below ( output of
ppc_82xx-gcc -v ) ::

Reading specs from /opt/montavista/pro/devkit/ppc/82xx/bin/../lib/gcc-
lib/powerpc-hardhat-linux/3.3.1/specs
Configured with: ../configure --host=i686-pc-linux-gnu --target=powerpc-
hardhat-linux 
--prefix=/opt/montavista/devkit/ppc/82xx --exec-
prefix=/opt/montavista/devkit/ppc/82xx 
--bindir=/opt/montavista/devkit/ppc/82xx/bin --
sbindir=/opt/montavista/devkit/ppc/82xx/sbin 
--sysconfdir=/opt/montavista/devkit/ppc/82xx/etc --
datadir=/opt/montavista/devkit/ppc/82xx/share 
--includedir=/opt/montavista/devkit/ppc/82xx/include --
libdir=/opt/montavista/devkit/ppc/82xx/lib 
--libexecdir=/opt/montavista/devkit/ppc/82xx/libexec --
localstatedir=/opt/montavista/devkit/ppc/82xx/var 
--sharedstatedir=/opt/montavista/devkit/ppc/82xx/share --
mandir=/opt/montavista/devkit/ppc/82xx/man 
--infodir=/opt/montavista/devkit/ppc/82xx/info --program-transform-
name=s,^,ppc_82xx-, --enable-cross 
--with-sysroot=/opt/montavista/devkit/ppc/82xx/target --enable-shared --enable-
languages=c,c++ --enable-__cxa_atexit 
--enable-threads=posix --disable-multilib --with-gxx-include-
dir='$'{gcc_tooldir}/../target/usr/include/c++/3.3.1 
--with-cpu=603
Thread model: posix
gcc version 3.3.1 (MontaVista 3.3.1-3.0.10.0300532 2003-12-24)

-- 
           Summary: FW: gcc 3.3.1 for Powerpc optimzation flag -Os generates
                    bad code
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: atul dot sabharwal at tek dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18912

Reply via email to