Re: crosscompilation

Matthew Wilcox (Matthew.Wilcox@genedata.com)
Mon, 19 Oct 1998 00:03:40 +0200


Note that this would have been better to linux-arm, as I only get
linux-kernel as digest.

> From: Werner Almesberger <almesber@lrc.di.epfl.ch>
> Date: Sun, 18 Oct 1998 02:31:36 +0200 (MET DST)
> Subject: ARM cross-compilation
>
> I'm trying to cross-compile 2.1.125 on a i386 for ARM. I'm a bit puzzled
> about the gcc and binutils to use ...
>
> - http://www.arm.uk.linux.org/armlinux/tools.html tells me that
> gcc/binutils 2.8 are broken and suggests to use some patched-up
> versions of gcc 2.7.2.2 and binutils 2.7. Tried that, but gcc fails
> to build libgcc1.a
> - Documentation/ARM-README in ftp://ftp.arm.uk.linux.org/pub/armlinux/
> kernel-sources/v2.1/pre-patch-2.1.125-19981015-1.gz tells me that
> gcc 2.8 and even egcs are fine. Tried gcc 2.8.1 and binutils 2.9.1,
> and lo and behold, everything builds just okay.
>
> There is one minor twist, though: so far I've only built for the
> target arm-psion-aout. Trying to build a kernel with this looks like a
> major uphill battle, because there seem to be many ELF dependencies.
> (Section attributes, etc.)
>
> A look at binutils*/bfd/config.bfd reveals that ELF is not supported for
> the ARM (binutils 2.8.1 and 2.9.1). But Documentation/ARM-README teases:
> > CROSS_COMPILE=/usr/bin/arm-unknown-linuxelf-
> (./configure just laughs at this ...)
>
> Now I'm confused. What kind of binutils are people using for compiling
> kernels for ARMs then ?? Or are 2.1 kernels simply not supposed to
> compile and I should try 2.0 ?

You should be using binutils 2.9.1.0.15, not plain 2.9.1. This includes
linux-arm support. egcs is reputed to work better than gcc 2.8.1.
I believe Phil Blundell has some patches for egcs which are not yet
merged in. See http://www.tazenda.demon.co.uk/phil/armlinux/ for details

-- 
Matthew Wilcox <willy@bofh.ai>
"I decry the current tendency to seek patents on algorithms.  There are
better ways to earn a living than to prevent other people from making use of
one's contributions to computer science."  -- Donald E. Knuth, TAoCP vol 3

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/