If you are only interested in using Linux/PARISC then please see the software information.
REQUIREMENTS FOR BUILDING THE TOOLCHAIN
If you don't want to hack the toolchain then is it easier to grab a precompiled one. See the Cross-compilers section of the software page for info on how to get that.
HOW TO BUILD THE TOOLCHAIN
The source trees of all of these are available through CVS but we also make available nightly snapshots from here. It is best to get a snapshot the first time you want to build a tree and update from CVS from then on.
- Fetch GCC, Binutils, Glibc, Linux:
cd
mkdir source
mkdir build
cd source
wget http://cvs.parisc-linux.org/download/binutils-latest.tar.gz
wget http://cvs.parisc-linux.org/download/get gcc-latest.tar.gz
wget http://cvs.parisc-linux.org/download/linux-latest.tar.gz
wget http://cvs.parisc-linux.org/download/glibc-latest.tar.gz
Determine the host system setup:
In the next few steps, you'll be configuring and building the toolchain.
It needs to be told the system you'll be hosting (running) the tools on.
For Intel-based Linux machines, the name is i386-linux . For
HPUX machines with PA-RISC processors, the name is hppa-hpux .
For Alpha-based Linux machines, the name is alpha-linux .
If you want to host your tools on a different architecture, and can't
determine your machine name, let us know.
In the instructions which follow, we use $MACH to represent this
machine name. You can set this as a shell variable with
MACH=i386-linux (in sh) or set MACH i386-linux
(in csh).
You also need to determine where you want to install it.
DEST=/usr/parisc or perhaps DEST=/opt/puffin
seem to be popular alternatives.
You might also want to leave off the --disable-nls option to configure
if you are not a native English speaker.
- Configure and build Binutils:
cd ~/source
zcat binutils-latest.tar.gz | tar -xf -
cd ~/build
mkdir binutils
cd binutils
~/source/binutils/configure --host=$MACH --prefix=$DEST --target=hppa-linux\
--enable-targets=hppa64-linux --disable-nls
make
make install
- Configure and partially build GCC:
cd ~/source
zcat gcc-latest.tar.gz | tar -xf -
cd gcc
contrib/gcc_update --touch
cd ~/build
mkdir gcc
cd gcc
# Only build the C compiler at this stage. We build the rest after glibc.
~/source/gcc/configure --host=$MACH --prefix=$DEST --target=hppa-linux\
--enable-shared --disable-nls --enable-languages=c
make
make install
- Unpack and configure the kernel:
cd ~/source
zcat linux-latest.tar.gz | tar -xf -
cd linux
make oldconfig
# This step is necessary to build header files that glibc needs.
make dep
- Configure and build glibc
cd ~/source
zcat glibc-latest.tar.gz | tar -xf -
cd ~/build
mkdir glibc
cd glibc
# Yes, --host and --prefix options are different here. That's because we are
# compiling glibc for our target machine. This glibc "runs on" hppa-linux.
# BEWARE, I had problems with --with-headers and had to specify a full path
# rather than using '~'.
~/source/glibc/configure --host=hppa-linux --build=$MACH\
--prefix=$DEST/hppa-linux --with-headers=$HOME/source/linux/include\
--disable-profile --without-cvs --enable-add-ons
make
make install
cd $DEST/hppa-linux/include
ln -s ~/source/linux/include/linux .
ln -s ~/source/linux/include/asm .
- Reconfigure and fully build GCC:
cd ~/build/gcc
~/source/gcc/configure --host=$MACH --prefix=$DEST --target=hppa-linux\
--enable-shared --disable-nls
make
make install
That's it!
|