FW: Error while building arm-elf cross-compiler with -arch=iwmmxt2

Sangeeta Ghangam sghangam@marvell.com
Wed Aug 5 22:41:00 GMT 2009



Ok , figured out the issue used --with-cpu=iwmmxt2 and --with-abi=aapcs in the configure. These options got me much farther in the compile process but now I have a new set of errors

/opt/src/gcc-4.4.1/gcc/crtstuff.c: In function '__do_global_dtors_aux':
/opt/src/gcc-4.4.1/gcc/crtstuff.c:301: error: '__DTOR_LIST__' undeclared (first
use in this function)
/opt/src/gcc-4.4.1/gcc/crtstuff.c:301: error: (Each undeclared identifier is reported only once
/opt/src/gcc-4.4.1/gcc/crtstuff.c:301: error: for each function it appears in.)
make[5]: *** [/tmp/build/gcc/arm-elf/thumb/libgcc/crtbegin.o] Error 1
make[5]: Leaving directory `/tmp/build/gcc/gcc'
make[4]: *** [gcc-extra-parts] Error 2
make[4]: Leaving directory `/tmp/build/gcc/arm-elf/thumb/libgcc'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory `/tmp/build/gcc/arm-elf/libgcc'
make[2]: *** [all-multi] Error 2
make[2]: Leaving directory `/tmp/build/gcc/arm-elf/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/tmp/build/gcc'
make: *** [all] Error 2
make: Leaving directory `/tmp/build/gcc'

Am I missing any recent patches/configure options?
Thanks for any help
Sangeeta

-----Original Message-----
From: Sangeeta Ghangam 
Sent: Tuesday, August 04, 2009 7:05 AM
To: 'gcc-help@gcc.gnu.org'
Subject: Error while building arm-elf cross-compiler with -arch=iwmmxt2


Hello,
I am trying to build an arm-elf cross-compiler with a gcc configure option -arch=iwmmxt2 ( or -cpu=iwmmxt2).
Following is the list of sources I have used:
Binutils-2.19.1
Gmp-4.3.1
Mpfr-2.4.1
Newlib-1.17.0
Gcc-core-4.4.1
Gcc-g++-4.4.1

I am building the toolchain on cygwin
Following are the configure options for binutils
/opt/src/binutils-2.19.1/configure --target=arm-elf --prefix=/gnutools -v 2>&1 | tee configure.out

I am building newlib with gcc by copying the newlib and libgloss folders into the gcc folder. Following are the configure options for gcc

/opt/src/gcc-4.4.1/configure --target=arm-elf --prefix=/gnutools --enable-languages=c,c++ --with-gnu-as --with-gnu-ld --with-newlib --with-gxx-include-dir=/gnutools/arm-elf/include --with-arch=iwmmxt2 --with-float=soft --with-mpfr-lib=/usr/local/lib --with-gmp-lib=/usr/local/lib -v 2>&1 | tee configure.out

I had initially configured and built gcc without using the '--with-cpu' option since I want a cross-compiler that would work with armv7 as well as iwmmxt2 architectures. I had no build issues but on compiling my test code I got an error that 'libgcc.a(_udiviso.o) uses FPA whereas target elf uses soft FP' , this inspite building gcc with the '--with-float=soft' option.
I looked on the web and found that unless '--with-arch or --with-cpu' option is specified while building gcc , libgcc gets built to use FPA by default.
That is why I am back to trying to build gcc with the '--with-arch' option.
Now I am getting gcc build errors when libgcc is built:
'checking for suffix of object files... configure: error: cannot
compute suffix of object files: cannot compile'

I get the same error even when I use '--with-arch=armv7' 
Is there any fix for this? How do I build a cross-compiler to work for both armv7 and iwmmxt2 architectures using soft float.
Thanks
Sangeeta



More information about the Gcc-help mailing list