1 # hdw - linux toolchain binutils package
3 # author: hackbard@hackdaworld.dyndns.org
7 # [D] binutils-2.15.91.0.1.tar.bz2 http://ftp.kernel.org/pub/linux/devel/binutils/
9 if [ "$priority" = "1" ] ; then
10 confopt=${confopt//--host* /--host=$hdw_arch_build }
11 confopt="$confopt --disable-nls"
12 # use host system tools
14 . ./scripts/optimization
16 make_conf="LDFLAGS=-all-static"
20 if [ "$priority" = "4" ] ; then
23 # install binutils linking against new libc
24 cd $root/tmp/src.binutils/binutils-build
27 rm -rf $root/tmp/src.binutils
29 # show new linker to gcc
30 SPECFILE=$prefix/lib/gcc-lib/*/*/specs &&
31 sed -e "s@/lib/ld.so.1@$prefix/lib/ld.so.1@g" \
32 -e "s@/lib/ld-linux.so.2@$prefix/lib/ld-linux.so.2@g" \
33 $SPECFILE > tempspecfile
34 mv tempspecfile $SPECFILE
36 rm -f $prefix/lib/gcc-lib/*/*/include/pthread.h
37 rm -f $prefix/lib/gcc-lib/*/*/include/bits/sigthread.h
41 if [ "$priority" = "5" ] ; then
42 confopt="$confopt --enable-shared --with-lib-path=$prefix/lib"
44 libpath="/usr/lib:/lib"
48 mkdir -p ../binutils-build
50 ../binutils-${ver}/configure $confopt &&
51 [ "$priority" = "1" ] && make configure-host
57 # linkers default library path (where our glibc will go)
59 make -C ld $make_conf LIB_PATH=$libpath
61 # store binutils tree to reinstall after glibc build
62 cd $root && mkdir -p tmp
63 rm -rf tmp/src.binutils && mv src.binutils tmp/