1 # hdw - linux toolchain binutils package
3 # author: hackbard@hackdaworld.dyndns.org
7 # [D] binutils-2.17.tar.bz2 http://ftp.gnu.org/gnu/binutils/
9 if [ "$priority" = "1" ] ; then
10 confopt="$confopt --disable-nls"
14 if [ "$priority" = "4" ] ; then
17 # install the ld linking against new libc
18 mv -v $bindir/{ld,ld-old}
19 mv -v $prefix/`gcc -dumpmachine`/bin/{ld,ld-old}
20 mv -v $bindir/{ld-new,ld}
21 ln -sfv $bindir/ld $prefix/`gcc -dumpmachine`/bin/ld
23 # show new linker to gcc
24 SPECFILE="`gcc --print-file specs`" &&
25 sed -e "s@/lib/ld.so.1@$prefix/lib/ld.so.1@g" \
26 -e "s@/lib/ld-linux.so.2@$prefix/lib/ld-linux.so.2@g" \
27 $SPECFILE > tempspecfile
28 mv tempspecfile $SPECFILE
30 INCDIR="`dirname $SPECFILE`/include"
33 # remove fixed includes from gcc's private include dir
34 find $INCDIR/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \;
35 rm -vf `grep -l "DO NOT EDIT THIS FILE" $INCDIR/*`
40 if [ "$priority" = "5" ] ; then
41 confopt="$confopt --enable-shared --with-lib-path=$prefix/lib"
42 if [ "$hdw_crossbuild" = "0" ] ; then
43 libpath="/usr/lib:/lib"
45 libpath="$prefix/usr/lib:$prefix/lib"
50 mkdir -p ../binutils-build
52 ../binutils-${ver}/configure $confopt &&
54 make $install_conf install
58 # build ld-new with changed linkers default library search path
59 # (glibc will go there)
61 make -C ld LIB_PATH=$libpath
62 cp -v ld/ld-new $bindir