Problems compiling GCC3.0 for powerpc-elf target on X86 linux
Mark Lancisi
mlancisi@netezza.com
Fri Jul 6 11:30:00 GMT 2001
Looking for a little help..
I'm attempting to build the GCC3.0 cross compiler
for the powerpc-elf target on a native X86 Red Hat 7.0 Linux box.
ÃÂ
I'm using the following:
ÃÂ
GCC - 3.0
binutils - 2.10.1
newlib - 1.9.0
gdb - 5.0
ÃÂ
TARGET = powerpc-elf
PREFIX = /usr/local/powerpc-elf
Common build directory for gcc, binutils, newlib -
/home/mlancisi/build_binutils
GCC Source dirÃÂ -
/home/mlancisi/gcc-3.0
ÃÂ
ÃÂ
Thusfar I have run into two problems, both during
the complete full build of GCC (binutils, bootstrap gcc, and newlib all built
fine.. I have not yet built the debugger.. )
ÃÂ
The first problem was with vsprintf.c in libiberty.
Command line and error as follows:
ÃÂ
/home/mlancisi/build_binutils/gcc/xgcc
-B/home/mlancisi/build_binutils/gcc/ -B/usr/local/powerpc-elf/powerpc-elf/bin/
-B/usr/local/powerpc-elf/powerpc-elf/lib/ -isystem
/usr/local/powerpc-elf/powerpc-elf/include -c -DHAVE_CONFIG_H -g -O2 -W -Wall
-I. -I../../../gcc-3.0/libiberty/../includeÃÂ -W -Wall -Wtraditional
-pedantic
../../../gcc-3.0/libiberty/vsprintf.c ../../../gcc-3.0/libiberty/vsprintf.c:
In function `vsprintf': ../../../gcc-3.0/libiberty/vsprintf.c:47: structure
has no member named `_flag' ../../../gcc-3.0/libiberty/vsprintf.c:47:
`_IOWRT' undeclared (first use in this
function) ../../../gcc-3.0/libiberty/vsprintf.c:47: (Each undeclared
identifier is reported only once ../../../gcc-3.0/libiberty/vsprintf.c:47:
for each function it appears in.) ../../../gcc-3.0/libiberty/vsprintf.c:47:
`_IOSTRG' undeclared (first use in this
function) ../../../gcc-3.0/libiberty/vsprintf.c:48: structure has no member
named `_ptr' ../../../gcc-3.0/libiberty/vsprintf.c:49: structure has no
member named `_cnt' ../../../gcc-3.0/libiberty/vsprintf.c:51: warning:
implicit declaration of function `_doprnt' make[1]: *** [vsprintf.o] Error
1 make[1]: Leaving directory
`/home/mlancisi/build_binutils/powerpc-elf/libiberty' make: ***
[all-target-libiberty] Error 2
ÃÂ
====
To get around this issue, based on some info
obtained in the crossgcc mailing list archives, I simply stubbed out vsprintf.c
(ifdeffed out actually) . I was unable to find powerpc-elf header files which
likely would have also fixed the problem.. I think I should be all set here
because I believe vsprintf is available in the standard lib... If anyone knows
different, please let me know!!!
ÃÂ
ÃÂ
##########################
ÃÂ
Second issue - Once vsprintf was stubbed out, the
build continued on until it got to another problem, mentioned more recently in
the archives, as follows:
ÃÂ
/home/mlancisi/build_binutils/gcc/xgcc
-B/home/mlancisi/build_binutils/gcc/ -nostdinc++
-L/home/mlancisi/build_binutils/powerpc-elf/nof/libstdc++-v3/src
-L/home/mlancisi/build_binutils/powerpc-elf/nof/libstdc++-v3/src/.libs
-B/usr/local/powerpc-elf/powerpc-elf/bin/
-B/usr/local/powerpc-elf/powerpc-elf/lib/ -isystem
/usr/local/powerpc-elf/powerpc-elf/include -msoft-float -mrelocatable-lib
-mno-eabi -mstrict-align -I../../../../../gcc-3.0/libstdc++-v3/../gcc
-I../../../../../gcc-3.0/libstdc++-v3/../include
-I../../../../../gcc-3.0/libstdc++-v3/include
-I../../../../../gcc-3.0/libstdc++-v3/include/std
-I../../../../../gcc-3.0/libstdc++-v3/include/c_std -I../include
-I../../../../../gcc-3.0/libstdc++-v3/libsupc++ -g -O2 -msoft-float
-mrelocatable-lib -mno-eabi -mstrict-align -fno-implicit-templates -Wall
-Wno-format -W -Wwrite-strings -Winline -fdiagnostics-show-location=once -g -c
../../../../../gcc-3.0/libstdc++-v3/libsupc++/new_op.cc -o
new_op.o /tmp/ccH7kBDC.s: Assembler messages: /tmp/ccH7kBDC.s:234: Error:
Relocation cannot be done when using -mrelocatable make[7]: *** [new_op.lo]
Error 1 make[7]: Leaving directory
`/home/mlancisi/build_binutils/powerpc-elf/nof/libstdc++-v3/libsupc++' make[6]:
*** [all-recursive] Error 1 make[6]: Leaving directory
`/home/mlancisi/build_binutils/powerpc-elf/nof/libstdc++-v3' make[5]: ***
[all-recursive-am] Error 2 make[5]: Leaving directory
`/home/mlancisi/build_binutils/powerpc-elf/nof/libstdc++-v3' make[4]: ***
[multi-do] Error 1 make[4]: Leaving directory
`/home/mlancisi/build_binutils/powerpc-elf/libstdc++-v3' make[3]: ***
[all-multi] Error 2 make[3]: Leaving directory
`/home/mlancisi/build_binutils/powerpc-elf/libstdc++-v3' make[2]: ***
[all-recursive] Error 1 make[2]: Leaving directory
`/home/mlancisi/build_binutils/powerpc-elf/libstdc++-v3' make[1]: ***
[all-recursive-am] Error 2 make[1]: Leaving directory
`/home/mlancisi/build_binutils/powerpc-elf/libstdc++-v3' make: ***
[all-target-libstdc++-v3] Error 2
ÃÂ
===
I found the recent discussion in the archives
regarding this issue as pertains to the powerpc-eabi cross compiler. The
question is, is thereÃÂ a generic fix for this as yet? Or a workaround? I'd
rather not have toÃÂ go back to GCC 2.95.3 to build the powerpc-elf cross
compiler, as we use the newly released GCC3.0 for our native
compiles...
ÃÂ
ÃÂ
Thanks in advance for ANY help!!
ÃÂ
ÃÂ
ÃÂ
markl
More information about the crossgcc
mailing list