Newbie crosstool problem

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View

I have a SUSE 10.3 host running on 32 bit x86 core and I am trying to
use crosstool to build a cross compiler for arm-linux.
Idownload the crosstool-0.43 archive and unpacked it. I edited my demo-
arm9tdmi shell script to look like this:

# This script has one line for each known working toolchain
# for this architecture.  Uncomment the one you want.
# Generated by from buildlogs/all.dats.txt

set -ex

# Really, you should do the mkdir before running this,
# and chown /opt/crosstool to yourself so you don't need to run as
mkdir -p $RESULT_TOP

#eval `cat arm9tdmi.dat gcc-3.2.3-glibc-2.2.5.dat` sh --notest
#eval `cat arm9tdmi.dat gcc-3.2.3-glibc-2.3.2.dat` sh --notest
#eval `cat arm9tdmi.dat gcc-3.2.3-glibc-2.3.2-tls.dat` sh --
#eval `cat arm9tdmi.dat gcc-3.3.6-glibc-2.2.5.dat` sh --notest
#eval `cat arm9tdmi.dat gcc-3.3.6-glibc-2.3.2.dat` sh --notest
#eval `cat arm9tdmi.dat gcc-3.3.6-glibc-2.3.2-tls.dat` sh --
#eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.2.5.dat` sh --notest
#eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.2.dat` sh --notest
#eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.2-tls.dat` sh --
#eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.5.dat` sh --notest
#eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.5-tls.dat` sh --
#eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.6.dat` sh --notest
#eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.6-tls.dat` sh --
#eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.2.dat` sh --notest
#eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.2-tls.dat` sh --
#eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.5.dat` sh --notest
#eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.5-tls.dat` sh --
#eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.6.dat` sh --notest
#eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.6-tls.dat` sh --
#eval `cat arm9tdmi.dat gcc-4.1.0-glibc-2.3.2.dat` sh --notest
eval `cat arm9tdmi.dat gcc-4.1.0-glibc-2.3.2-tls.dat` sh --

echo Done.

and ran it.

After a lot of downloads and building I eventually get an error:

+ CC=gcc
+ /home/rico/ct/crosstool-0.43/build/arm-9tdmi-linux-gnu/gcc-4.1.0-
glibc-2.3.2/glibc-2.3.2/configure --prefix=/usr --build=i686-pc-linux-
gnu --host=arm-9tdmi-linux-gnu --without-cvs --disable-sanity-checks --
arm-9tdmi-linux-gnu/include --enable-hacker-mode
checking build system type... i686-pc-linux-gnu
checking host system type... arm-9tdmi-linux-gnu
checking sysdep dirs... sysdeps/arm/elf sysdeps/unix/sysv/linux/arm
sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/
mman sysdeps/unix/inet sysdeps/unix/sysv sysdeps/unix/arm sysdeps/unix
sysdeps/posix sysdeps/arm/fpu sysdeps/arm sysdeps/wordsize-32 sysdeps/
ieee754/flt-32 sysdeps/ieee754/dbl-64 sysdeps/ieee754 sysdeps/generic/
elf sysdeps/generic
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for pwd... /bin/pwd
checking for arm-9tdmi-linux-gnu-gcc... gcc
checking version of gcc... 4.2.1, bad
checking for gnumake... no
checking for gmake... gmake
checking version of gmake... 3.81, ok
configure: error:
*** These critical programs are missing or too old: gcc
*** Check the INSTALL file for required versions.

which -a gcc return:


and gcc --version | head -1 returns:

gcc (GCC) 4.2.1 (SUSE Linux)

Can somebody point me in the right direction please?



Re: Newbie crosstool problem
Quoted text here. Click to load it

Could you check your glibc configure script? It may test for a version
of gcc
3.2.X or later. If it doesn't test for a number greater than 3, it
will fail.

Re: Newbie crosstool problem
You probably need to go back to a gcc in the 3.4 era. Gcc 4.x is much more
demanding and frequently fails on code that has only been compiled on 3.4.
because it is much less forgiving -Clark

Quoted text here. Click to load it

Re: Newbie crosstool problem

If you are using GCC4.x to cross-build a GCC3.x toolchain you will in
almost all cases need some special patches for the GCC and/or glibc
sources. I've recently sucessfully built a gcc-3.3.2/glib-2.3.2 arm-linux
toolchain under Gentoo2007, which uses GCC4.1.2 as native
compiler. However, i did not use crosstool for that purpose. I followed the
howto found here: (you will have to
register first; then search for topic "cross-compiler" and you will
find an article "Build a GCC-based cross-compiler for Linux" which is
a step-by step instruction set).

Good luck!

Site Timeline