Can't build an i486 cross-compiler

Thunder Scientific Corporation mike@ThunderScientific.com
Fri Mar 10 13:26:00 GMT 2000


I'm trying to build a cross compiler to produce i486 elf code on my
i686-pc-linux-gnu machine.  My objective is to link with the newlib run time
library rather than libc.  I have a fresh installation of Red Hat 6.1, and
I'm running as root.  As in my previous bug report, I have installed the
latest sources and untarred them into binutils-2.9.1, gcc-2.95,
newlib-1.8.2, and gdb-4.18.  I'm more or less exactly following the examples
from the CrossGCC FAQ.

Scenario:

In /usr/src:
      host=i686-pc-linux-gnu
      target=i486-pc-linux-gnu
      prefix=/cross
      i=$prefix/bin
      mkdir build-binutils build-gcc build-newlib build-gdb

Building binutils goes fine:
      cd build-binutils
      ../binutils-2.9.1/configure --target=$target --prefix=$prefix -v \
        &> config.log
      make all install &> make.log

Building gcc crumps:
      cd ../build-gcc
      ../gcc-2.95/configure --target=$target --prefix=$prefix -v \
      --with-headers=../newlib-1.8.2/newlib/libc/include  &> config.log
      make all install &> make.log
      .
      .
      [snip]
      .
      .
      /bin/sh: i486-pc-linux-gnu-ar: command not found

As mentioned before, I had to use the "--with-headers=" to avoid file not
found errors on the #include <stdlib.h> and the #incluse <unistd.h>
statements.  The offending command was actually found as
/cross/.../i486-pc-linux-gnu-ar.  Perhaps the present build scripts cannot
properly handle the "--prefix=" statement.

Richard Bowser
Engineer
Thunder Scientific Corporation

email:    richardb@thunderscientific.com





More information about the Gcc-bugs mailing list