This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: crosscompiler for ia64
- From: Brian Dessent <brian at dessent dot net>
- To: Eduardo Martinez Pardeiro <eduxmp at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 14 Dec 2007 16:40:42 -0800
- Subject: Re: crosscompiler for ia64
- References: <43f288560712141301k6f5ef9fbvc4930bda898f2a7f@mail.gmail.com>
- Reply-to: gcc-help at gcc dot gnu dot org
Eduardo Martinez Pardeiro wrote:
> I want to build a crosscompiler from i486 to ia64-hp-hpux11.23.
> I know in configure have to specify --target=ia64-hp-hpux11.23, but
> only with this, i have a mistake. What more have i do?
The problem that you're running into is that gcc is just the compiler,
it is not the C library. If you try to build a cross compiler without a
libc (i.e. just using what comes with gcc) you will get something that
is not very useful as it can't link any programs -- which also means it
won't be able to build libgcc or libstdc++ or any of the other required
support libraries, let alone a "hello world" C program. This is
probably not what you want.
One way to supply these items is with a sysroot. Take the relevant
items from the target system (e.g. /usr/include and /usr/lib or
whereever they are located) and reproduce them in the same tree
structure in some subdirectory on the cross host. Then supply the top
of that location as --with-sysroot=/foo/bar when configuring the cross
compiler. If you don't have an appropriate target system to get a copy
of these files from then you're in a bit of a pickle. If the target is
open source you can use a more complicated process to bootstrap them
from source, but when you're targeting a proprietary target like HP-UX
there's really no choice but to copy them from the target system.
Brian