This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How to build a gcc 3.1-based crosscompiling toolchain?
- From: Tiemo Krüger - mycable GmbH<tiemo dot krueger at mycable dot de>
- To: Tobias Hunger <tobias at fresco dot org>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 22 Jul 2002 08:09:05 +0200
- Subject: Re: How to build a gcc 3.1-based crosscompiling toolchain?
- References: <200207191855.49255.tobias@fresco.org>
Hi,
I just build cross-toolchasins for MIPS, but I think the way will be the
same.
- At the beginning make sure that you have header files from an old
toolchain installed
- Build the cross-binutils (in my case it's ../binutils/configure
--target=mipsel-linux liblibdir='${exec_prefix}'/mipsel-linux/i386-
linux/lib; then make)
- build a static-gcc (in my case it's ../gcc/configure
--target=mipsel-linux --enable-languages=c --disable-shared --with-
headers=/home/toolch/mips-include-headers/; then make)
- cross-build of glibc (../glibc/configure --build=i686-linux
--host=mipsel-linux \ --enable-add-ons --prefix=/usr
--disable-sanity-checks; make; su root; make install
install_root=/usr/local/mipsel-linux/glibc; cd ..)
-Build final c and c++ cross-gcc (../gcc/configure --target=mipsel-linux
--enable-languages=c,c++; make; make install)
Building a cross-toolchain isn't that simple. It takes some time to
figure out how to do it. Even the when and where of using root-rights or
normal user rights during configuration, make and install isn't trivial.
But that's what we're paid for :-)
Let me know if this was any help for you
Tiemo
--
-------------------------------------------------------
Tiemo Krueger Tel: +49 48 73 90 19 86
mycable GmbH Fax: +49 48 73 90 19 76
Boeker Stieg 43
D-24613 Aukrug eMail: tk@mycable.de
Public Kryptographic Key is available on request
-------------------------------------------------------
Tobias Hunger wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi!
I am trying to build a gcc 3.1 based crosscompiling toolchain from ix86-linux
to arm-linux. So far I got binutils to compile and install and I have the
kernel configured and the necessary include files installed.
Now I am trying to build a gcc that is capable of building glibc. This is what
I am trying to do:
configure --target=arm-linux --host=i686-linux --prefix=/install/dir/
--with-newlib --disable-threads --enable-languages=c --without-fp
There is no FPU in my Sharp Zaurus which I am trying to build this
crosscompiler for. I don't want to use the kernel-emu. The probelm is that
the build stops with this error:
/path/BUILD/gcc/xgcc -B/path/BUILD/gcc/ -B/install/dir/arm-linux/bin/
- -B/install/dir/arm-linux/lib/ -isystem /install/dir/arm-linux/include -O2
- -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes
- -Wmissing-prototypes -isystem ./include -fomit-frame-pointer -fPIC -g0
- -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -shared -nodefaultlibs
- -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc/./libgcc.map -o
libgcc_s.so.1 libgcc/./_udivsi3.o libgcc/./_divsi3.o libgcc/./_umodsi3.o
[... lots of other files...]
libgcc/./unwind-sjlj.o -lc && rm -f libgcc_s.so && ln -s libgcc_s.so.1
libgcc_s.so
/install/dir/arm-linux/bin/ld: cannot open crti.o: No such file or directory
collect2: ld returned 1 exit status
make[4]: *** [libgcc_s.so] Error 1
There is a crti.asm file in config/arm/. Should that get build? What did I do
wrong?
- --
Gruss,
Tobias
- ------------------------------------------------------------
Tobias Hunger The box said: 'Windows 95 or better'
tobias@fresco.org So I installed Linux.
- ------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9OESTv0FZW3NyoqURAneXAJ9vW/3AoXoUzr9LMYOoYY5kWeccdACfb0sx
SUVH/XAaaUVoKAUdXFcmsKM=
=fcwn
-----END PGP SIGNATURE-----
--
-------------------------------------------------------
Tiemo Krueger Tel: +49 48 73 90 19 86
mycable GmbH Fax: +49 48 73 90 19 76
Boeker Stieg 43
D-24613 Aukrug eMail: tk@mycable.de
Public Kryptographic Key is available on request
-------------------------------------------------------