X-Git-Url: https://hackdaworld.org/gitweb/?p=hdw-linux%2Fhdw-linux.git;a=blobdiff_plain;f=packages%2Ftoolchain%2Fbinutils%2Fbinutils;fp=packages%2Ftoolchain%2Fbinutils%2Fbinutils;h=fce7aa10082e98247ead669a5b5234aeb71b8bd2;hp=e6a78bda8ae978437c058ed742bfaff7cd7657de;hb=c7b7c7d4ce2f5a6947e42ff37d9584d26eb52ba4;hpb=4dfe4bc90c6670e31d52449b3294467e879eda28 diff --git a/packages/toolchain/binutils/binutils b/packages/toolchain/binutils/binutils index e6a78bd..fce7aa1 100644 --- a/packages/toolchain/binutils/binutils +++ b/packages/toolchain/binutils/binutils @@ -2,27 +2,23 @@ # # author: hackbard@hackdaworld.dyndns.org # -# [V] 2.16.91.0.1 +# [V] 2.17 # [S] 0-1 0-4 0-5 -# [D] binutils-2.16.91.0.1.tar.bz2 http://ftp.kernel.org/pub/linux/devel/binutils/ +# [D] binutils-2.17.tar.bz2 http://ftp.gnu.org/gnu/binutils/ if [ "$priority" = "1" ] ; then confopt="$confopt --disable-nls" - # use host system tools - hdw_arch_prefix="" ; hdw_cflags="" - . ./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 + # install the ld linking against new libc + mv -v $bindir/{ld,ld-old} + mv -v $prefix/`gcc -dumpmachine`/bin/{ld,ld-old} + mv -v $bindir/{ld-new,ld} + ln -sfv $bindir/ld $prefix/`gcc -dumpmachine`/bin/ld # show new linker to gcc SPECFILE="`gcc --print-file specs`" && @@ -30,9 +26,14 @@ if [ "$priority" = "4" ] ; then -e "s@/lib/ld-linux.so.2@$prefix/lib/ld-linux.so.2@g" \ $SPECFILE > tempspecfile mv tempspecfile $SPECFILE + + INCDIR="`dirname $SPECFILE`/include" unset SPECFILE - rm -f $prefix/lib/gcc-lib/*/*/include/pthread.h - rm -f $prefix/lib/gcc-lib/*/*/include/bits/sigthread.h + + # remove fixed includes from gcc's private include dir + find $INCDIR/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \; + rm -vf `grep -l "DO NOT EDIT THIS FILE" $INCDIR/*` + unset INCDIR } fi @@ -54,11 +55,9 @@ build_main() { } post_install() { - # linkers default library path (where our glibc will go) + # build ld-new with changed linkers default library search path + # (glibc will go there) 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/ + cp -v ld/ld-new $bindir }