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]

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


Please, no more lectures on how to get the header files over to make the
gcc-2.95.2 Crosscompiler.  I have gone through Hell trying to get
everything only to get down to another error in a duplicate defined
variable that is not declared the same.  I'll explain more in a minute:

First, Please Understand my Environment:

+  Redhat 6.1 Linux setup with kernel-2.2.12-20 on an Pentium II 366 Mhz
Machine (aka i686)

+ System Include files are in /usr/include  with /usr/include/linux ->
/usr/src/linux/include and /usr/include/asm ->
/usr/src/linux/include/asm

+ I've had to download full sources for kernel-2.2.12 (Installation
Source only has includes for just the i386 host), gcc-2.95.2,
binutils-2.9.1, and glibc-2.1.

+ I have made native bin-utils and gcc for my system
(Host=i686-gnu-linux, Target = i686-gnu-linux) successfully.

+ I have made a cross bin-utils tools for the powerpc-elf target
(Host=i686-gnu-linux, Target=powerpc-elf).

+  Steps I use to make the gcc Crosscompiler:

    1.  In build directory:  ../gcc-2.96.2/configure
--target=powerpc-elf --use-with-headers=/usr/include -v
          (--prefix=/usr/local/powerpc not included since pointing the
prefix to any other directory than /usr/local
             makes the bin tools unaccessible to the compiler).

    2.  cd /usr/local/powerpc-elf/sys-includes

    3.  Correct linux link to point to /usr/src/linux/include/linux and
asm link to point to /usr/src/linux/include/asm-ppc

    4.  Create the bit subdirectory in
/usr/local/powerpc-elf/sys-includes/ and populate it with the powerpc
headers, generic, and system V /bit header from glibc-2.1.

    5.  make (as specified in the GCC document).

+  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'

I know how to look up previous declarations, but, come on, why don't the
declarations completely match to begin with?  Or, as you see what I'm
doing, what libraries are conflicting?

I can't believe I can't get a crosscompiler for my machine.  I have
looked at links and practically all of them are how to configure
Host=Win32 Cygwin tools to something (which makes the directories to use
easy) and am discovering that this does me absolutely no good.  I'm very
frustrated.

Anyhow, someone please shed some light on this for me.

Thanks again in advance for any help (excluding the lecture on how I
should find where the header files should be used).

========================

Kai Ruottu wrote:

> On Wed, 17 Nov 1999 04:09:05 +0000, Opinionated
> <opinionated@whoever.com> wrote:
>
> >Hello All,
> >
> >I was having one specific problem compiling a cross-compiler for
> gcc.  I
> >finally got a cross-compiler on gcc-2.8.1 after I finally found the
> >patch which clears up a 'can't find stdio.h' error.  I have noticed
> that
> >gcc-2.95.2 has the exact same problem.
>
>  When you most probably need a C-library for your compiler, with the
> <stdio.h> etc. headers, I see your problem being not having the
> C-library binaries or sources when starting to build GCC. For 'system'
>
> targets the proprietary headers and libs for the system are mostly the
>
> only alternative, but Linux has the glibc-2.x.x binaries and sources
> and embedded systems have the Cygnus newlib sources...

<snip>


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