[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cross-compiler for HURD/Alpha?

From: Roland McGrath
Subject: Re: Cross-compiler for HURD/Alpha?
Date: Fri, 19 Apr 2002 16:49:27 -0400 (EDT)

I got an alpha*-*-gnu* target configuration put into the current GCC
sources, but that is not in any release yet.  I think it might only go into
3.2, I'm not sure if 3.1 was frozen already when I sent the patch.  I
suspect that you could apply those patches to 3.0.4 and have them work, but
probably the easiest thing to do is just work from the current (unreleased)
GCC sources--that's how I made my alpha-gnu cross-compiler.

See http://gcc.gnu.org/ for details on using GCC's anonymous CVS.
Once you have that checked out, just do (but see below first):

        .../gcc/configure --host=YOUR-HOST --target=alpha-gnu
        make install

(I always use a separate build directory, so replace ".../gcc/" with the
relative path to your source directory.)  You can use `alpha-unknown-gnu'
or `alphaev8-frobozz-gnu' or any other GNU configuration target that
matches the pattern `alpha*-*-gnu*'; whatever alias you choose will be the
name of your cross tools (i.e. alpha-gnu-gcc et al).

That's all there is to it.  I always get errors building libgcc2 when I do
a cross-compiler, but you can just ignore that to begin with.

Before you do this, you should have appropriate binutils installed.  If
your host is another Alpha/ELF system, then you might get away with just
skipping this step, or you might need to make a bunch of symlinks
alpha-gnu-ld -> ld and the like.  For binutils, the alpha-linux or
alpha-elf targets are just the same as what you need for alpha-gnu.  Extant
binutils versions don't understand "alpha-gnu" but the change is as simple
as finding the spots in bfd/config.bfd and ld/configure.tgt where
`alpha*-*-linux*' appears and adding the `alpha*-*-gnu*' pattern there.  
(I have more complete binutils patches that I have not submitted for
incorporation yet, but that simple change suffices for now.)

It is important to have working alpha-gnu-{ld,as} and so forth already
available in your path when you run gcc's configure script.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]