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"
12 echo "libpath = $libpath"
15 if [ "$priority" = "4" ] ; then
18 # install the ld linking against toolchain libc
19 mv -v $prefix/bin/{ld,ld-old}
20 mv -v $prefix/`gcc -dumpmachine`/bin/{ld,ld-old}
21 mv -v $prefix/bin/{ld-new,ld}
22 ln -sfv $prefix/bin/ld $prefix/`gcc -dumpmachine`/bin/ld
24 # show new linker to gcc
25 SPECFILE="`gcc -print-libgcc-file-name`"
26 SPECFILE="`dirname $SPECFILE`/specs"
28 sed -e "s@/lib/ld.so.1@$prefix/lib/ld.so.1@g" \
29 -e "s@/lib/ld-linux.so.2@$prefix/lib/ld-linux.so.2@g" > \
31 echo "debug: (specfile ->$SPECFILE)"
32 cp -v $SPECFILE $hdw_home_dir
34 echo "debug: (gcc -dumpspecs)"
37 INCDIR="`dirname $SPECFILE`/include"
40 # remove fixed includes from gcc's private include dir
41 find $INCDIR/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \;
42 rm -vf `grep -l "DO NOT EDIT THIS FILE" $INCDIR/*`
47 if [ "$priority" = "5" ] ; then
48 confopt="$confopt --disable-nls --with-lib-path=$prefix/lib"
49 if [ "$hdw_crossbuild" = "0" ] ; then
50 libpath="/usr/lib:/lib"
52 libpath="$root/usr/lib:$root/lib"
57 mkdir -p ../binutils-build
59 ../binutils-${ver}/configure $confopt &&
61 make $install_conf install
65 # build ld-new with changed linkers default library search path
66 # (glibc will go there)
68 make -C ld LIB_PATH=$libpath
69 cp -v ld/ld-new $prefix/bin