2 msggfortran 4.2.1
4 msgDifficulties with creating a cross compiler
4 msgGCC Core , G77 4.2.1
6 msgA problem related with installation of gcc 4.2.1?
1 msgSVN access over https (SSL)
1 msgBuilding GCC for vxWorks
4 msghelp with gcj
1 msgNot to link specific library
4 msgC++: operator new and disabled exceptions
3 msgcompiling program
1 msgissue related to debugging on dual threaded target
2 msgHelp in modifying GCOV code
2 msgcombining polymorphism and templates
1 msgRAM-Memory counter for C programmes
3 msgDefault stack size

How to build cross compiler g++ ?
\ Peter Skvarka (26 Sep 2007)
. \ Peter Skvarka (26 Sep 2007)
. \ Brian Dessent (26 Sep 2007)

3 msgPoor pow() / floating point performance of on x...
2 msgavr-g++ and exception handling
5 msgprintf() checking for custom functions
1 msgQuestion On Floating Point In Gcc For Solaris S...
Subject:How to build cross compiler g++ ?
Group:Gcc-help
From:Peter Skvarka
Date:26 Sep 2007


Hi,

I need to built toolchain with g++ 3.4.4 for arm9 target.
I found several tutorials, but it seems no of them describes how to build
functional g++, but only gcc.

Last I tried this one: http://www.schnozzle.org/~coldwell/toolchain/

Building and installing binutils - OK.
Building and installing Linux kernel headers - OK.
Building and installing Glibc headers - OK.


After successful building Glibc headers I use this adjusted configure
command for creating makefile (added c++ and --without-headers):
../../gcc-3.4.4/configure --prefix=${PREFIX} --target=${TARGET}
--enable-languages=c,c++ --with-sysroot=${SYSROOT} --without-headers 2>&1 |
tee configure.out
make 2>&1 | tee make.out
make install 2>&1 | tee -a make.out

GNU C library (nothing changed by me ) :
BUILD_CC=gcc CC=${CROSS_COMPILE}gcc AR=${CROSS_COMPILE}ar
RANLIB=${CROSS_COMPILE}ranlib AS=${CROSS_COMPILE}as LD=${CROSS_COMPILE}ld
../../glibc-2.3.5/configure --prefix=/usr --build=i386-redhat-linux
--host=arm-unknown-linux-gnu --target=arm-unknown-linux-gnu
--without-__thread --enable-add-ons=linuxthreads
--with-headers=${SYSROOT}/usr/include 2>&1 | tee configure.out
make 2>&1 | tee make.out
make install_root=${SYSROOT} install

Stage 2 GCC (added c++ in --enable-languages parameter) :
../../gcc-3.4.4/configure --prefix=${PREFIX} --target=${TARGET}
--enable-languages=c,c++ --with-headers --with-sysroot=${SYSROOT} 2>&1 | tee
configure.out
make 2>&1 | tee make.out
make install 2>&1 | tee -a make.out

this step is finished with this error:
....
checking for main in -lm... configure: error: Link tests are not allowed
after GCC_NO_EXECUTABLES.
make: *** [configure-target-libstdc++-v3] Error 1

When I look into ./gcc I am seeing here created g++, but after installing it
it is not runnable, because it has not libstdc++, also under all my src
directory with toolchain sources is not libstdc++, only some epty
directories with that name are here.
What am I doing wrong ?
It seems that libstdc++ for 3.4.4 is missing, or it should be built with GNU
C library ?
I dont understand it, help me.

Thanks,
Peter



© 2004-2008 readlist.com