Crosscompiling GCC 3.4.3 x86/linux to PPC604/VxWorks

Roberto Fichera kernel@tekno-soft.it
Mon Jan 31 14:45:00 GMT 2005


Hi All

I'm trying to crosscompile the gcc 3.4.3 on linux/x86 and target host as 
PPC604/VxWorks,
but I notice some problem.

1: The first compilation of the C compiler get compiled without any problem,
but starting from the second doesn't compile anymore until I remove or 
overwrite the
${PREFIX}/powerpc-wrs-vxworks/sys-include. I think because the fixincludes 
changes
the CPU definition and its relative checks.

2: The libstdc++v3 doesn't compile because somethings are undefined see the 
error log below:
....
Making all in src
make[6]: Entering directory 
`/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/PPC403gnu/libstdc++-v3/src'
/bin/sh ../libtool --tag CXX --mode=compile /usr/src/gcc-3.4.3/gcc/xgcc 
-shared-libgcc -B/usr/src/gcc-3.4.3/gcc/ -nostdinc++ 
-L/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/PPC403gnu/libstdc++-v3/src 
-L/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/PPC403gnu/libstdc++-v3/src/.libs 
-B/usr/local/vxworks/powerpc-wrs-vxworks/bin/ 
-B/usr/local/vxworks/powerpc-wrs-vxworks/lib/ -isystem 
/usr/local/vxworks/powerpc-wrs-vxworks/include -isystem 
/usr/local/vxworks/powerpc-wrs-vxworks/sys-include  -t403 
-I/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/PPC403gnu/libstdc++-v3/include/powerpc-wrs-vxworks 
-I/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/PPC403gnu/libstdc++-v3/include 
-I/usr/src/gcc-3.4.3/libstdc++-v3/libsupc++ -O2 -g -O2 -g -O2  -t403 
-fno-implicit-templates -Wall -W -Wwrite-strings 
-Wcast-qual  -fdiagnostics-show-location=once    -c -o allocator.lo 
../../../.././libstdc++-v3/src/allocator.cc
/usr/src/gcc-3.4.3/gcc/xgcc -shared-libgcc -B/usr/src/gcc-3.4.3/gcc/ 
-nostdinc++ 
-L/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/PPC403gnu/libstdc++-v3/src 
-L/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/PPC403gnu/libstdc++-v3/src/.libs 
-B/usr/local/vxworks/powerpc-wrs-vxworks/bin/ 
-B/usr/local/vxworks/powerpc-wrs-vxworks/lib/ -isystem 
/usr/local/vxworks/powerpc-wrs-vxworks/include -isystem 
/usr/local/vxworks/powerpc-wrs-vxworks/sys-include -t403 
-I/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/PPC403gnu/libstdc++-v3/include/powerpc-wrs-vxworks 
-I/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/PPC403gnu/libstdc++-v3/include 
-I/usr/src/gcc-3.4.3/libstdc++-v3/libsupc++ -O2 -g -O2 -g -O2 -t403 
-fno-implicit-templates -Wall -W -Wwrite-strings -Wcast-qual 
-fdiagnostics-show-location=once -c 
../../../.././libstdc++-v3/src/allocator.cc -o allocator.o
In file included from 
/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/PPC403gnu/libstdc++-v3/include/ext/pool_allocator.h:55,
                  from ../../../.././libstdc++-v3/src/allocator.cc:37:
/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/PPC403gnu/libstdc++-v3/include/bits/concurrence.h:48: 
error: expected class-name before '{' token
/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/PPC403gnu/libstdc++-v3/include/bits/concurrence.h: 
In constructor `__glibcxx_mutex::__glibcxx_mutex()':
/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/PPC403gnu/libstdc++-v3/include/bits/concurrence.h:49: 
error: cannot convert `__glibcxx_mutex* const' to `semaphore**' for 
argument `1' to `void __gthread_mutex_init_function(semaphore**)'
/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/PPC403gnu/libstdc++-v3/include/bits/concurrence.h: 
In constructor `__gnu_cxx::lock::lock(__gnu_cxx::mutex_type&)':
/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/PPC403gnu/libstdc++-v3/include/bits/concurrence.h:84: 
error: cannot convert `__gnu_cxx::mutex_type*' to `semaphore**' for 
argument `1' to `int __gthread_mutex_lock(semaphore**)'
/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/PPC403gnu/libstdc++-v3/include/bits/concurrence.h: 
In destructor `__gnu_cxx::lock::~lock()':
/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/PPC403gnu/libstdc++-v3/include/bits/concurrence.h:87: 
error: cannot convert `__gnu_cxx::mutex_type*' to `semaphore**' for 
argument `1' to `int __gthread_mutex_unlock(semaphore**)'
make[6]: *** [allocator.lo] Error 1
make[6]: Leaving directory 
`/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/PPC403gnu/libstdc++-v3/src'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory 
`/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/PPC403gnu/libstdc++-v3'
make[4]: *** [all] Error 2
make[4]: Leaving directory 
`/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/PPC403gnu/libstdc++-v3'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory 
`/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/libstdc++-v3'
make[2]: *** [all-multi] Error 2
make[2]: Leaving directory 
`/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/libstdc++-v3'
make[1]: *** [all] Error 2
make[1]: Leaving directory 
`/usr/src/gcc-3.4.3/powerpc-wrs-vxworks/libstdc++-v3'
make: *** [all-target-libstdc++-v3] Error 2

Does anyone know how to resolve these problems?

Please CC me directly because I'm not subscribed on the mailing list.

Best regards,

Roberto Fichera. 



More information about the Gcc-help mailing list