# hdw - linux toolchain binutils package # # author: hackbard@hackdaworld.dyndns.org # # [V] 2.15.91.0.1 # [S] 0-1 0-4 0-5 # [D] binutils-2.15.91.0.1.tar.bz2 http://ftp.kernel.org/pub/linux/devel/binutils/ if [ "$priority" = "1" ] ; then confopt="$confopt --disable-nls" # use host system tools hdw_arch_prefix="" . ./scripts/optimization unset CFLAGS libpath="$prefix/lib" fi if [ "$priority" = "4" ] ; then custmain=1 custmain() { # install binutils linking against new libc cd $root/tmp/src.binutils/binutils-build make -C ld install cd - rm -rf $root/tmp/src.binutils # show new linker to gcc SPECFILE="`gcc --print-file specs`" && sed -e "s@/lib/ld.so.1@$prefix/lib/ld.so.1@g" \ -e "s@/lib/ld-linux.so.2@$prefix/lib/ld-linux.so.2@g" \ $SPECFILE > tempspecfile mv tempspecfile $SPECFILE unset SPECFILE rm -f $prefix/lib/gcc-lib/*/*/include/pthread.h rm -f $prefix/lib/gcc-lib/*/*/include/bits/sigthread.h } fi if [ "$priority" = "5" ] ; then confopt="$confopt --enable-shared --with-lib-path=$prefix/lib" if [ "$hdw_crossbuild" = "0" ] ; then libpath="/usr/lib:/lib" else libpath="$prefix/usr/lib:$prefix/lib" fi fi build_main() { mkdir -p ../binutils-build cd ../binutils-build ../binutils-${ver}/configure $confopt && make $make_conf && make $install_conf install } post_install() { # linkers default library path (where our glibc will go) make -C ld clean make -C ld LIB_PATH=$libpath # __very__ ___ugly___ # store binutils tree to reinstall after glibc build cd $root && mkdir -p tmp rm -rf tmp/src.binutils && mv src.binutils tmp/ }