Package: binutils Version: 2.17cvs20070426-8 Patch
Hello, To be able to build a cross gcc toolchain i have been applying this patch latelly, it is updated to latest binutils version. I wonder if this should be submitted binutils upstream. diff -urN binutils-2.17/debian/patches/00list binutils-2.17.aux/debian/patches/00list --- binutils-2.17/debian/patches/00list 2006-10-18 02:40:38.000000000 +0000 +++ binutils-2.17.aux/debian/patches/00list 2006-10-18 02:34:33.000000000 +0000 @@ -12,3 +12,4 @@ 305_pr4497 306_ld_demangler_segfault 307_pr4558 +999_lib64_for_cross diff -urN binutils-2.17/debian/patches/999_lib64_for_cross.dpatch binutils-2.17.aux/debian/patches/999_lib64_for_cross.dpatch --- binutils-2.17/debian/patches/999_lib64_for_cross.dpatch 1970-01-01 00:00:00.000000000 +0000 +++ binutils-2.17.aux/debian/patches/999_lib64_for_cross.dpatch 2006-10-18 02:34:17.000000000 +0000 @@ -0,0 +1,56 @@ +#! /bin/sh -e +## 999_lib64_for_cross.dpatch by Nikita Youshchenko <[EMAIL PROTECTED]> +## +## DP: Add /usr/${target-alias}/lib${LIBPATH_SUFFIX} to ld's default +## DP: library search path for cross targets. Needed for cross targets that +## DP: try to support both 32bit and 64bit emulations. + +if [ $# -lt 1 ]; then + echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}" + +case "$1" in + -patch) patch -p1 ${patch_opts} < $0;; + -unpatch) patch -R -p1 ${patch_opts} < $0;; + *) + echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 + exit 1;; +esac + +exit 0 + [EMAIL PROTECTED]@ +diff -urNad /home/nikita/debian/binutils/binutils-2.14.90.0.7.cross/ld/genscripts.sh binutils-2.14.90.0.7.cross/ld/genscripts.sh +--- /home/nikita/debian/binutils/binutils-2.14.90.0.7.cross/ld/genscripts.sh 2003-10-29 20:37:48.000000000 +0300 ++++ binutils-2.14.90.0.7.cross/ld/genscripts.sh 2004-07-15 00:29:19.000000000 +0400 +@@ -179,6 +179,27 @@ + *:: | ::*) LIB_PATH=${LIB_PATH}${LIB_PATH2} ;; + *) LIB_PATH=${LIB_PATH}:${LIB_PATH2} ;; + esac ++ ++ # For multilib'ed targets, ensure both ${target_alias}/lib${LIBPATH_SUFFIX} ++ # and ${TOOL_LIB}/lib${LIBPATH_SUFFIX} to default search path, because ++ # 64bit libraries may be in both places, depending on cross-development ++ # setup method (e.g.: /usr/s390x-linux/lib64 vs /usr/s390-linux/lib64) ++ case "${LIBPATH_SUFFIX}:${tool_lib}" in ++ :*) ;; ++ *:*${LIBPATH_SUFFIX}) ;; ++ *) ++ paths="${exec_prefix}/${target_alias}/lib${LIBPATH_SUFFIX}" ++ if [ "${TOOL_LIB}" != x ]; then ++ paths="${paths} ${exec_prefix}/${TOOL_LIB}/lib${LIBPATH_SUFFIX}" ++ fi ++ for path in $paths; do ++ case :${LIB_PATH}: in ++ ::: | *:${path}:*) ;; ++ *) LIB_PATH=${path}:${LIB_PATH} ;; ++ esac ++ done ++ ;; ++ esac + fi + + # Always search $(tooldir)/lib, aka /usr/local/TARGET/lib, except for Regards -- Héctor Orón
diff -urN binutils-2.17/debian/patches/00list binutils-2.17.aux/debian/patches/00list --- binutils-2.17/debian/patches/00list 2006-10-18 02:40:38.000000000 +0000 +++ binutils-2.17.aux/debian/patches/00list 2006-10-18 02:34:33.000000000 +0000 @@ -12,3 +12,4 @@ 305_pr4497 306_ld_demangler_segfault 307_pr4558 +999_lib64_for_cross diff -urN binutils-2.17/debian/patches/999_lib64_for_cross.dpatch binutils-2.17.aux/debian/patches/999_lib64_for_cross.dpatch --- binutils-2.17/debian/patches/999_lib64_for_cross.dpatch 1970-01-01 00:00:00.000000000 +0000 +++ binutils-2.17.aux/debian/patches/999_lib64_for_cross.dpatch 2006-10-18 02:34:17.000000000 +0000 @@ -0,0 +1,56 @@ +#! /bin/sh -e +## 999_lib64_for_cross.dpatch by Nikita Youshchenko <[EMAIL PROTECTED]> +## +## DP: Add /usr/${target-alias}/lib${LIBPATH_SUFFIX} to ld's default +## DP: library search path for cross targets. Needed for cross targets that +## DP: try to support both 32bit and 64bit emulations. + +if [ $# -lt 1 ]; then + echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}" + +case "$1" in + -patch) patch -p1 ${patch_opts} < $0;; + -unpatch) patch -R -p1 ${patch_opts} < $0;; + *) + echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 + exit 1;; +esac + +exit 0 + [EMAIL PROTECTED]@ +diff -urNad /home/nikita/debian/binutils/binutils-2.14.90.0.7.cross/ld/genscripts.sh binutils-2.14.90.0.7.cross/ld/genscripts.sh +--- /home/nikita/debian/binutils/binutils-2.14.90.0.7.cross/ld/genscripts.sh 2003-10-29 20:37:48.000000000 +0300 ++++ binutils-2.14.90.0.7.cross/ld/genscripts.sh 2004-07-15 00:29:19.000000000 +0400 +@@ -179,6 +179,27 @@ + *:: | ::*) LIB_PATH=${LIB_PATH}${LIB_PATH2} ;; + *) LIB_PATH=${LIB_PATH}:${LIB_PATH2} ;; + esac ++ ++ # For multilib'ed targets, ensure both ${target_alias}/lib${LIBPATH_SUFFIX} ++ # and ${TOOL_LIB}/lib${LIBPATH_SUFFIX} to default search path, because ++ # 64bit libraries may be in both places, depending on cross-development ++ # setup method (e.g.: /usr/s390x-linux/lib64 vs /usr/s390-linux/lib64) ++ case "${LIBPATH_SUFFIX}:${tool_lib}" in ++ :*) ;; ++ *:*${LIBPATH_SUFFIX}) ;; ++ *) ++ paths="${exec_prefix}/${target_alias}/lib${LIBPATH_SUFFIX}" ++ if [ "${TOOL_LIB}" != x ]; then ++ paths="${paths} ${exec_prefix}/${TOOL_LIB}/lib${LIBPATH_SUFFIX}" ++ fi ++ for path in $paths; do ++ case :${LIB_PATH}: in ++ ::: | *:${path}:*) ;; ++ *) LIB_PATH=${path}:${LIB_PATH} ;; ++ esac ++ done ++ ;; ++ esac + fi + + # Always search $(tooldir)/lib, aka /usr/local/TARGET/lib, except for