Making the gcc-2.95.2 Crosscompiler for Linux RedHat 6.1 Host.

Opinionated opinionated@whoever.com
Fri Nov 26 17:36:00 GMT 1999


Thank you Kai.

My target is indeed in this instance an embedded powerpc system running
VxWorks.  I was trying to get a cross compiler that would at least compile up
to the assembly language source, and perhaps linking in with the VxWorks
objects(but not use the VxWorks headers until after i get the cross
compiler..I don't want VxWorks to be integrated into my cross compiler).
However, I will be perfectly happy to have something at least compile and
look like it is linking, and not really care about the final product since I
will have to recompile my code on a VxWorks tools platform for the final
result.  This would make my life easier though since I could now write and
compile my programs and check that they will compile correctly before
recompiling them again with the VxWorks tools.  (The catch is that VxWorks
uses gnu tools including gcc-2.7.2 and, now, gcc-2.92.).  I know, I could get
a license for their products, but I have other reasons for 'independent'
tools.

I will double check what I am using, and I really appreciate the heads up on
sys_errlist.  Perhaps I'll be running here in a bit.

Thanks again for your help.



Kai Ruottu wrote:

> On Fri, 26 Nov 1999 15:14:49 GMT, karuottu@freenet.hut.fi (Kai Ruottu)
> wrote:
>
> >On Fri, 26 Nov 1999 05:45:18 +0000, Opinionated
> ><opinionated@whoever.com> wrote:
> >
> >>Please, no more lectures on how to get the header files over to make the
> >>gcc-2.95.2 Crosscompiler.
>
>  I apologize the 'lecture' again, but as the matter of fact, knowing
> the basic rules will help solving the problem...
>
> >>+  After compiling for a few minutes I come to a hard stop on compiling
> >>/gcc2.95-2/libiberty/strerror.c:461 previous declaration of
> >>'sys_errlist'
>
>  The 'crossgcc' mail-list should have a (unanswered?) message from
> Jessica Brown, which describes the same error, in the same row... So
> let's handle this after having studied the 'lecture'.
>
>  The Jessica's message shows that the offending line (461) will be
> used if the HAVE_SYS_ERRLIST is not defined. This should be defined
> in the 'config.h' or something in the libiberty subdir.
>
>  As the 'lecture' said, for libiberty is a search tried in the current
> 'libc.a/libc.so', to see what is missing from it. When you don't have
> the 'libc.a/libc.so' for the target, it doesn't know anything about
> it. So it thinks there isn't a symbol with the name 'sys_errlist' in
> your 'libc.a/libc.so' and the HAVE_SYS_ERRLIST will be left undefined.
> It doesn't search anything from the target headers (although one would
> wish that...).
>
>  So you must use a 'grep HAVE_SYS_ERRLIST *.h' in the libiberty
> subdir, to see which of the automatically generated config headers
> must be fixed (I remember it being the 'config.h'). There may become
> other errors just like this, resulting purely from the unexistence of
> any libraries for the target system... So going the 'config.h' through
> and fixing all the definitions there, is a substitute for the work
> that the configuration scripts could have done if you had the libs.
>
>  So, whether your target is an embedded 'powerpc-elf' or the Linux/PPC
> 'powerpc-linux-gnu', it is quite necessary to have pre-built libs
> for the target BEFORE trying to build libiberty. So you must build
> newlib or glibc after the 'gcc-2.95.2/gcc' is ready, i.e. the compiler
> is ready and only the additional libiberty, libobjc and libstdc++
> parts are still missing. But much better would be if you had ANY
> pre-built libs for the target. Updating the C-library can be left
> later.
>
> > For discussion about problems with the Linux/PPC-cross-toolset, I
> >just refer to the 'crossgcc'-maillist archive available via:
> >   http://sourceware.cygnus.com
>
>  Perhaps all the extra details for a x86-linux-to-powerpc-eabi or
> for a x86-linux-to-powerpc-linux could belong better to the currently
> quite quiet 'crossgcc'-mail-list. The site 'www.objsw.com' should have
> info about how to join, and perhaps the mail-archive is also there.
> Perhaps the Cygnus site hasn't anything about crossgcc any more...
>
>  I strongly suggest downloading the mail-archive and browsing it
> through... If you cannot get the archive from the messages in this
> year, just send your real mail-address (the 'opinionated@whoever.com'
> sounds like an invented one), I can forward all the messages I have in
> my mail-archive about the powerpc-target to you...



More information about the Gcc-help mailing list