Installation of a Cross-Compiler (IA32 -> Itanium)
By Marco Aurélio Stelmar Netto (CPAD-PUCRS/HP)
From a howto posted here
Contents
This document is a cookbook that describes how to build a cross-compiler for the compilation of 64 bit Itanium code on an IA32 machine. The following steps were tested on Debian 3.0r1 and Slackware 8.0 GNU/Linux distributions using the bash shell.
Get all the include and library files of an Itanium machine (target machine)
Login in an Itanium machine and execute the following steps:
cd /tmp
mkdir files files/include files/lib
cp /usr/include/* files/include/ -a
cp /lib/* /usr/lib/* files/lib -a
tar zcvf files.tgz files
Transfer the files.tgz file to the IA32 machine where you will build the cross-compiler. The following steps are executed on an IA32 machine:
Choose a directory where you want to install the cross compiler
Let's choose the /usr/local/ia64-linux/ directory. We will refer it as $IA64DIR.
mkdir /usr/local/ia64-linux/
- Untar the files.tgz file (libraries and includes from the Itanium machine)
cd $IA64DIR
tar zxvf files.tgz
rm files.tgz
Configure the libc.so file
Use an editor to set up the GROUP variable in $IA64DIR/lib/libc.so file. The original content of the GROUP variable could be for example:
GROUP ( /lib/libc.so.6.1 /usr/lib/libc_nonshared.a )
Set it to:
GROUP ( /usr/local/ia64-linux/lib/libc.so.6.1 /usr/local/ia64-linux/lib/libc_nonshared.a )
Install the binutils package
Download binutils-2.14.tar.bz2 file and move it to /tmp
cd /tmp
tar jxvf binutils-2.14.tar.bz2
cd binutils-2.14/
./configure --target=ia64-linux --prefix=/usr/local
make
cd ld/
make clean
make LIB_PATH=$IA64DIR/lib
cd ..
make install
Install the gcc package
Download gcc-3.2.3.tar.gz and move it to /tmp
cd /tmp
tar zxvf gcc-3.2.3.tar.gz
cd gcc-3.2.3/
export PATH=$PATH:/usr/local/bin
(necessary for gcc to find the ia64-linux-nm program)
(use 'setenv PATH /usr/local/bin:$PATH' instead of 'export' if you use csh or tcsh shell)
./configure --enable-threads=posix --with-libs=$IA64DIR/lib/ \
--with-headers=$IA64DIR/include --target=ia64-linux \
--prefix=/usr/local --enable-languages=c
make
make install
That's all!
Your gcc (cross) will be available in $IA64DIR/bin/gcc
