This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcc, second pass, building libstdc++: libiberty config problems


Folks,

  First off, while this is my first post to the list, many
thanks to all of you... I wouldn't have gotten as far as I
have without the mailing list archives.

  I'm building an arm tool chain, to be hosted on Cygwin.
I am actually able to build the entire tool chain, and have
used it to build and run "hello, world" on the target board.

  However... when building the final version of gcc, libstdc++
tries to configure and build libiberty using the cross-compiler.
In several places, the libiberty configure script then uses the
cross-compiler to build an arm executable (successfully), and
then tries to execute that program on the host.  This causes
an illegal instruction error, and W2K pops up a dialog box that
hangs the build until it's cleared.

  I have the feeling that I'm probably missing something obvious
when configuring the second pass gcc build... I'd appreciate any
suggestions or clues you might be able to offer.

Some (hopefully useful) information is included below.

  Thanks,

-Samrobb

- build machine is using gcc-3.0.1, binutils-2.11.90
- packages used in the tool chain are binutils-2.11.2,
  gcc-3.0, glibc-2.2.3, newlib-1.9.0
- I'm unpacking source archives into /tmp/CS89712/src, building
  them in /tmp/CS89712/build, and installing them into
  /tmp/CS89712/cross-tools
- I build binutils, gcc (C only, using newlib), glibc, and then
  use glibc to build gcc (C and C++)
- The portion of the build script used to build the second pass
  of gcc:

  cd /tmp/CS89712/build/gcc-3.0
  rm -rf *

  CC=gcc.exe \
  AR=ar.exe \
  AS=as.exe \
  /tmp/CS89712/src/gcc-3.0/configure \
    --build=i686-pc-cygwin32 \
    --host=i686-pc-cygwin32 \
    --target=armv4l-unknown-linux-gnu \
    --prefix=/tmp/CS89712/cross-tools \
    --with-gnu-ld \
    --with-gnu-as \
    --with-headers=/tmp/CS89712/cross-tools/include \
    --with-libs=/tmp/CS89712/cross-tools/lib \
    --enable-languages=c,c++ \
    --nfp \
    --with-cpu=arm7tdmi \
    --program-suffix=.exe

  make all
  make install

- This eventually generates the following output:

Configuring in armv4l-unknown-linux-gnu/libiberty
loading cache ../config.cache
checking host system type... armv4l-unknown-linux-gnu
checking build system type... i686-pc-cygwin32
checking for armv4l-unknown-linux-gnu-ar... (cached) ar.exe
checking for armv4l-unknown-linux-gnu-ranlib... (cached) ranlib.exe
checking for gcc... (cached)
/tmp/CS89712/build/gcc-3.0/gcc/xgcc -B/tmp/CS89712/build/gcc3.0/gcc/ -B/tmp/
CS89712/cross-tools/armv4l-unknown-linux-gnu/bin/ -B/tmp/CS89712/cross-tools
/armv4l-unknown-linux-gnu/lib/ -isystem
/tmp/CS89712/cross-tools/armv4l-unknown-linux-gnu/include
checking whether we are using GNU C... (cached) yes
checking whether
/tmp/CS89712/build/gcc-3.0/gcc/xgcc -B/tmp/CS89712/build/gcc-3.0/gcc/ -B/tmp
/CS89712/cross-tools/armv4l
-unknown-linux-gnu/bin/ -B/tmp/CS89712/cross-tools/armv4l-unknown-linux-gnu/
lib/ -isystem /tmp/CS89712/cross-tools/armv4l-unknown-linux-gnu/include
accepts -g... (cached) yes
checking for POSIXized ISC... no
checking for working const... yes
checking for inline... inline
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking how to run the C preprocessor... (cached)
/tmp/CS89712/build/gcc-3.0/gcc/xgcc -B/tmp/CS89712/build/gcc-3.0/gcc/
 -B/tmp/CS89712/cross-tools/armv4l-unknown-linux-gnu/bin/ -B/tmp/CS89712/cro
ss-tools/armv4l-unknown-linux-gnu/lib/ -isys
tem /tmp/CS89712/cross-tools/armv4l-unknown-linux-gnu/include -E
checking for sys/file.h... yes
checking for sys/param.h... yes
checking for limits.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for unistd.h... yes
checking for strings.h... yes
checking for sys/time.h... yes
checking for time.h... yes
checking for sys/resource.h... yes
checking for sys/stat.h... yes
checking for sys/mman.h... yes
checking for fcntl.h... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether errno must be declared... no
checking whether the C compiler
(/tmp/CS89712/build/gcc-3.0/gcc/xgcc -B/tmp/CS89712/build/gcc-3.0/gcc/ -B/tm
p/CS89712/cross-tools/armv4l-unknown-linux-gnu/bin/ -B/tmp/CS89712/cross-too
ls/armv4l-unknown-linux-gnu/lib/ -isystem
/tmp/CS89712/cross-tools/armv4l-unknown-linux-gnu/include  ) works...

- After compiling the test for the C compiler, configure attempts to execute
  it, generating the illegal instruction error.


---------------------------
16 bit MS-DOS Subsystem
---------------------------
~/Sandbox
The NTVDM CPU has encountered an illegal instruction.
CS:0662 IP:0307 OP:ff 3f 01 00 00 Choose 'Close' to terminate the
application.
---------------------------
Close   Ignore
---------------------------





------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]