Building GCC 2.95.2 for VxWorks (powerpc)

Kai Ruottu kai.ruottu@luukku.com
Wed Jan 3 04:33:00 GMT 2001


"Paul D. Smith" wrote:
> 
> I have VxWorks 5.3.1, with GCC 2.7.2 with host Solaris and target
> PowerPC (PPC603, or powerpc-eabi).  I do not have the source from WRS
> for this version of GCC; I can't find anyone at WRS who will tell me how
> to get it :-/.  I'm still trying.
> 
> Anyway, I need to build GCC 2.95.2 for this same target, but on host
> Linux instead of Solaris.
>
> Then I tried to build GCC 2.95.2.  I don't want to use newlib, I want to
> use the stuff from WRS--is this possible?

 Not possible but obligatory... The only reason to try newlib could be
when there aren't any original target libs and headers at all...
 
> What I did was create $prefix/powerpc-wrs-vxworks/sys-include as a
> symlink pointing to the headers that came with the old GCC 2.7.2
> compiler for host Solaris.

 Making a copy would have been better, keeping the originals untouched.
Putting them in 'sys-include' enables the header fixing, but this doesn't
mean removing or renaming any original headers, although this case needs
also these things...
 
> Then libiberty built, but now I'm getting this error in libio/iovfprintf.c:
> 
>   ../../../gcc-2.95.2/libio/iovfprintf.c: In function `_IO_vfprintf':
>   ../../../gcc-2.95.2/libio/iovfprintf.c:292: parse error before `int'

 The VxWorks headers are a mess where the old gcc-2.7.2 C++ headers are
mixed with the VxWorks standard C headers. Cannot understand any reason
for this mess, every other GCC keeps the standard C headers and the version-
specific C++ headers in separate directories...

 So your first job is to purify the VxWorks headers by removing all the
C++ headers in them. That's why the copies could be much better... How to
recognize the C++ headers is then the problem. If you have an installed
'normal' gcc-2.7.2.x, the C++ headers are in '/usr/lib/g++-include' (Linux),
if a gcc-2.95.2, in '/usr/include/g++-3' (Linux). Making a printed list
of them and removing all the headers seen in the list from the VxWorks
headers, is one solution for the recognition-problem. Instructions about
"How-To purify the standard VxWorks C-headers from all C++-garbage" could
be a useful document in the archive of this list...

Cheers, Kai



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list