This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


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...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]