[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The following are the necessary utilities for creating the cross-compilation environment.
ftp://ftp.gnu.org/puv/gnu/gettext/gettext-0.10.40.tar.gz
ftp://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.8.tar.gz
See the instructions in libiconv-1.8/README
for instructions
how to build GNU libiconv with GNU gettext.
ftp://ftp.gnu.org/pub/gnu/sed/sed-3.02.tar.gz
For some reason GNU sed 4.0.1 didn't work on NetBSD host. It worked fine with the GNU/NetBSD host, though.
ftp://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.53.tar.gz
:pserver:anoncvs@sources.redhat.com:/cvs/src
GCC source is a recent checkout from the gcc-3_2-branch
at
:pserver:anoncvs@gcc.gnu.org:/cvs/gcc
:pserver:anoncvs@sources.redhat.com:/cvs/glibc
The build plarform is NetBSD 1.6 (i386-unknown-netbsdelf1.6J). The canonical name of the host (and target) configuration is i386-pc-netbsd-gnu. You'll need a recent version of config.sub and config.guess in order to recognize it. Get the from here config.guess.gz and here config.sub.gz.
Overwrite each config.sub and config.guess file in the GNU binutils, GCC and GNU libc source trees, e.g.:
find gcc-3.2 -name config.sub -exec cp config.sub {} \; |
GNU autoconf needs this patch autoconf.diff.gz. It replaces a
bogus use of not yet installed header <assert.h>
with
<limits.h>
, which comes with the compiler.
Patch GNU Binutils with the following patch binutils.diff.gz.
Configure the GNU Binutils with:
configure --prefix=/usr/velco/toolchain --target=i386-netbsd-gnu |
then build and install them as follows:
cd libiberty && gmake cd ../bfd && gmake cd ../opcodes && gmake cd ../intl && gmake cd ../binutils && gmake && gmake install cd ../gas && gmake && gmake install cd ../ld && gmake && gmake install |
Add the the toolchain executables to the path:
export PATH=/usr/velco/toolchain/bin:$PATH |
So you can use a native GDB to debug the i386-netbsd-gnu binaries.
Patch the GCC with the following patch gcc.diff.gz. Unpack and
copy this file netbsd-gnu.h.gz to gcc/config/i386
.
Configure GCC with:
configure --prefix=/usr/velco/toolchain --target=i386-netbsd-gnu \ --enable-languages=c |
Note that we haven't yet tried to build other languages.
Build and install with:
gmake && gmake install |
Added __GNU__ to the usual set of NetBSD predefined macros.
stddef.h
Do not include <machine/ansi.h>
if __GNU__
is defined.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |