Subject: Re: New ARM ELF toolchain patch
To: Reinoud Zandijk <>
From: Ben Harris <>
List: port-arm
Date: 04/24/2001 13:00:02
On Tue, 24 Apr 2001, Reinoud Zandijk wrote:

> On Tue, 24 Apr 2001, Ben Harris wrote:
> > <URL:
> >      arm-elf-toolchain-20010424.diff>
> >
> > This is updated for the latest imports into gnu/dist/toolchain.  The only
> > substantive change is that structure alignment is back to the traditional
> > eight bits.  It seems to build an arm26 kernel correctly, at least.
> Thanks :)) ... i'm still a bit ... euhm ... carefull to install it but
> i'll try it on my RiscPC since my Shark is normally doing the ARM
> compilations ... that way i have 2 toolchains to test :)

You shouldn't try to replace your existing toolchain with this one anyway.
Just build it as a cross-compiler with --prefix=/usr/local or whatever.

Hrm, yeah, documentation (of a sort):

0: You'll need a source directory (e.g. /usr/src), a build directory (e.g.
/usr/crossobj) and a destination directory (e.g. /usr/cross).

1: Apply the patch to a -current source tree.  You'll also need the patch
I posted to tech-toolchain yesterday, unless I've committed it already.

2: In /usr/crossobj, run

/usr/src/gnu/dist/toolchain/configure \
  --target=arm-unknown-netbsdelf --prefix=/usr/cross

3: Run "make".

4: The build will eventually fall over somewhere in libio.  This is
nothing to worry about -- it's built all the important stuff by this
point.  Run "make install".

5: You now have a compiler in /usr/cross/bin/arm-unknown-elf-gcc, with
other tools in the obviously-analogous places.  You'll need a new "cpp"
script, which you can find alongside the patch on

6: To use these, you'll want to set lots of environment variables when
running "make".  My list (which will obviously vary for other people)

export ADDR2LINE=/opt/netbsd/cross/bin/arm-unknown-netbsdelf-addr2line
export AR=/opt/netbsd/cross/bin/arm-unknown-netbsdelf-ar
export AS=/opt/netbsd/cross/bin/arm-unknown-netbsdelf-as
export CC=/opt/netbsd/cross/bin/arm-unknown-netbsdelf-gcc
#export CPP=/opt/netbsd/cross/bin/arm-unknown-netbsdelf-cpp
export CXX=/opt/netbsd/cross/bin/arm-unknown-netbsdelf-c++
export CXXFILT=/opt/netbsd/cross/bin/arm-unknown-netbsdelf-cxxfilt
export LD=/opt/netbsd/cross/bin/arm-unknown-netbsdelf-ld
export MAKE=arm26make
export NM=/opt/netbsd/cross/bin/arm-unknown-netbsdelf-nm
export OBJCOPY=/opt/netbsd/cross/bin/arm-unknown-netbsdelf-objcopy
export RANLIB=/opt/netbsd/cross/bin/arm-unknown-netbsdelf-ranlib
export SIZE=/opt/netbsd/cross/bin/arm-unknown-netbsdelf-size
export STRIP=/opt/netbsd/cross/bin/arm-unknown-netbsdelf-strip
export MACHINE=arm26 MACHINE_ARCH=arm26
export DESTDIR=${DESTDIR:-/export/arm26}

Ben Harris                                                   <>
Portmaster, NetBSD/arm26               <URL:>