[parisc-linux] ELF tool chain builds hello world!!!
Paul Bame
bame@endor.fc.hp.com
Thu, 11 May 2000 16:12:09 -0600
To build the limping tool chain, grab the latest CVS bits for
binutils, gcc, and glibc, and follow a recipe somewhat like this
(it's not exact unfortunately, but should contain all the tricks):
PREFIX=$HOME/xc
cvs co binutils glibc gcc
cd gcc
ln -s ../binutils gcc/binutils
mkdir build-gcc
cd build-gcc
../gcc/configure \
--disable-nls \
--disable-shared \
--target=hppa1.1-linux \
--host=i586-pc-linux-gnu \
--prefix=$PREFIX \
--with-headers=/opt/puffin/include \
--with-libs=$PREFIX/lib \
--with-libc
make # need libiberty.a
# build until binutils is complete
cd binutils; make install
PATH=$PREFIX/bin:$PATH
cd ../..; mkdir build-glibc; cd build-glibc
../glibc/configure \
--disable-nls \
--without-nls \
--disable-shared \
--disable-profile \
--enable-static-nss \
--build=i586-linux \
--host=hppa1.1-linux \
--disable-sanity-checks \
--with-headers=/opt/puffin/include \
--prefix=$PREFIX
make # fails pretty soon
cp ../glibc/csu/crt?.S csu/
make # gets pretty far then fails looking for crtbegin.o
cd ../build-gcc
## Remove $PREFIX/bin from your $PATH!!!
## Repeat GCC configure from above then...
make install # This installs the rest of gcc just in case...
cd ../build-glibc; make
make install MAKEINFO=
cd $(dirname $(find $PREFIX -name crtbegin.o))
ln -s $PREFIX/lib/* .
# Now you should be able to compile hello world
# The problem is that not all the headers seem to be available, in
# two categories: 1) some headers for example glibc/string/memory.h
# which ought to be installed as ...../include/string/memory.h, aren't
# and 2) things in <sys> like <sys/mount.h>