[PATCH] binutils: slind modifications
Here go most of the modifications that we've done to binutils, merged
to latest debian package and tested to build for all architectures
that concern us.
1. _OBFUSC_ stuff is there to fake cross compilation in the case when
$DEB_HOST_GNU_TYPE == $DEB_BUILD_GNU_TYPE
2. LIBC_TARGET is an externally-supplied variable that should contain
the name of a libc implementation UNLESS it is glibc.
If you want to compile for uclibc-arm target, set TARGET=arm-linux
LIBC_TARGET=uclibc, or for glibc-arm set: TARGET=arm.
3. To properly support uclibc, a patch (taken from buildroot) is
added. This patch usually changes from one binutils release to
another, so it requires updating.
--- binutils.debian/debian/rules 2006-04-21 16:37:02.000000000 +0400
+++ binutils/debian/rules 2006-04-26 18:42:07.000000000 +0400
@@ -38,6 +38,11 @@
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+# Introduce obfuscated host gnu type, to make sure binutils always
+# cross-build, even in case the target is exactly the same.
+DEB_HOST_OBFUSC_GNU_TYPE := $(shell dpkg-architecture
-qDEB_HOST_GNU_TYPE | sed 's/-/-host_/')
+DEB_BUILD_OBFUSC_GNU_TYPE := $(shell dpkg-architecture
-qDEB_BUILD_GNU_TYPE | sed 's/-/-build_/')
+
CC = gcc
CFLAGS = -g -O2
STRIP = strip --remove-section=.comment --remove-section=.note
@@ -92,6 +97,11 @@
-rm -f $(pwd)/test-summary
-rm -fr $(d_bin) $(d_dev) $(d_mul) $(d_doc) $(d_hppa64)
-rm -rf debian/patched debian/tmp debian/files debian/substvars
+ for i in $$(find -name debian -prune -o -name '*.info*.saved' -print); \
+ do \
+ echo restore $$i; \
+ mv $$i $${i%*.saved}; \
+ done
################################################################################
@@ -138,7 +148,7 @@
mkdir builddir-multi
cd builddir-multi \
&& env CC="$(CC)" ../configure $(CONFARGS) \
- --enable-targets=alpha-linux-gnu,arm-linux-gnu,hppa-linux-gnu,i486-gnu,i486-linux-gnu,ia64-linux-gnu,m68k-linux-gnu,m68k-rtems,mips-linux-gnu,mipsel-linux-gnu,mips64-linux-gnu,mips64el-linux-gnu,powerpc-linux-gnu,powerpc64-linux-gnu,s390-linux-gnu,s390x-linux-gnu,sh-linux-gnu,sparc-linux-gnu,sparc64-linux-gnu,x86_64-linux,m32r-linux-gnu
+ --enable-targets=alpha-linux-gnu,arm-linux-gnu,hppa-linux-gnu,i486-gnu,i486-linux-gnu,ia64-linux-gnu,m68k-linux-gnu,m68k-rtems,mips-linux-gnu,mipsel-linux-gnu,mips64-linux-gnu,mips64el-linux-gnu,powerpc-linux-gnu,powerpc64-linux-gnu,s390-linux-gnu,s390x-linux-gnu,sh-linux-gnu,sparc-linux-gnu,sparc64-linux-gnu,x86_64-linux-gnu,m32r-linux-gnu
$(MAKE) -C builddir-multi configure-host
touch configure-multi-stamp
@@ -179,7 +189,7 @@
CFLAGS="$(CFLAGS)"
touch build-hppa64-stamp
-build_stamps = build-single-stamp build-multi-stamp
+build_stamps = pre-build build-single-stamp build-multi-stamp
ifeq ($(DEB_HOST_ARCH),hppa)
build_stamps += build-hppa64-stamp
endif
@@ -187,6 +197,13 @@
build-stamp: $(build_stamps)
touch build-stamp
+pre-build:
+ for i in $$(find -name debian -prune -o ! -name '*.saved' -name
'*.info*' -print); do \
+ if [ ! -f $$i.saved ]; then \
+ echo "save $$i"; \
+ cp -p $$i $$i.saved; \
+ fi; \
+ done
################################################################################
@@ -339,6 +356,7 @@
dpkg-gencontrol -isp -P$(d_doc) -p$(p_doc)
chown -R root:root $(d_doc)
chmod -R go=rX $(d_doc)
+ [ -x /usr/bin/pkgstriptranslations ] && /usr/bin/pkgstriptranslations || true
dpkg --build $(d_doc) ..
################################################################################
@@ -438,6 +456,7 @@
chown -R root:root $(d_bin) $(d_dev) $(d_mul)
chmod -R go=rX $(d_bin) $(d_dev) $(d_mul)
+ [ -x /usr/bin/pkgstriptranslations ] && /usr/bin/pkgstriptranslations || true
dpkg --build $(d_bin) ..
dpkg --build $(d_dev) ..
dpkg --build $(d_mul) ..
@@ -468,7 +487,12 @@
override TARGET := $(try_convert)
endif
-p_cross = $(subst _,-,binutils-$(TARGET))
+ifdef LIBC_TARGET
+ p_suffix = $(subst _,-,$(TARGET)-$(LIBC_TARGET))
+else
+ p_suffix = $(subst _,-,$(TARGET))
+endif
+p_cross = binutils-$(p_suffix)
d_cross = debian/$(p_cross)
ifneq ($(filter sparc-linux-gnu powerpc-linux-gnu mips-linux-gnu, $(TARGET)),)
@@ -498,10 +522,30 @@
test "" != "$(TARGET)"
rm -rf configure-$(TARGET)-stamp builddir-$(TARGET)
mkdir builddir-$(TARGET)
+
+# In case of cross-compilation, we use obfuscated host gnu type,
+# to make sure binutils always builds a cross version -- even if the target
+# is exactly the same as host.
+
+ifdef LIBC_TARGET
+# Since we currently to do not support canadian builds, --build is redundant.
+# Probably, though, we should make it a parameter -- like crosstool does.
+# FIXME.
cd builddir-$(TARGET) \
- && env CC="$(CC)" ../configure --host=$(DEB_HOST_GNU_TYPE) \
- --build=$(DEB_BUILD_GNU_TYPE) --target=$(TARGET) --prefix=/usr \
+ && env CC="$(CC)" ../configure
--host=$(DEB_HOST_OBFUSC_GNU_TYPE) \
+ --target=$(TARGET)-$(LIBC_TARGET) \
+ --prefix=/usr \
+ --disable-werror \
+ --enable-multilib \
+ --disable-nls \
+ $(ADDITIONAL_TARGETS)
+else
+ cd builddir-$(TARGET) \
+ && env CC="$(CC)" ../configure --host=$(DEB_HOST_OBFUSC_GNU_TYPE) \
+ --disable-werror \
+ --target=$(TARGET) --prefix=/usr \
$(ADDITIONAL_TARGETS)
+endif
touch $@
build-$(TARGET)-stamp: configure-$(TARGET)-stamp
@@ -526,10 +570,14 @@
test "" != "$(TARGET)"
sed "/^$$/ q" < debian/control > debian/control.$(TARGET)
- sed -e "s/__TARGET__/$$(echo -n $(TARGET) | sed s/_/-/g)/" \
- < debian/control.cross.in >> debian/control.$(TARGET)
+ sed -e "s/__TARGET__/$$(echo -n $(p_suffix) | sed s/_/-/g)/" \
+ < debian/control.cross.in >> debian/control.$(TARGET)
+ sed -e "s/__TARGET__/$(tmp_cpu)/" \
+ -e "s/__PREFIX__/$(p_suffix)/" < debian/cross.postinst.in \
+ > debian/cross.postinst
$(install_dir) $(d_cross)/DEBIAN
+ $(install_script) debian/cross.postinst $(d_cross)/DEBIAN/postinst
$(install_dir) $(d_cross)/usr/share/doc/$(p_cross)/
$(install_file) debian/changelog
$(d_cross)/usr/share/doc/$(p_cross)/changelog.Debian
@@ -549,7 +597,8 @@
$(checkdir)
test "" != "$(TARGET)"
rm -rf $(d_cross) debian/control.$(TARGET) debian/files debian/substvars \
- builddir-$(TARGET) {configure,build,install}-$(TARGET)-stamp
+ builddir-$(TARGET) {configure,build,install}-$(TARGET)-stamp \
+ debian/cross.postinst
.PHONY: binary-cross clean-cross
--- /dev/null 2006-04-06 17:49:18.425220240 +0400
+++ binutils/debian/cross.postinst.in 2006-04-26 18:04:12.000000000 +0400
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+#set -e
+
+TARGET="__TARGET__"
+PREFIX="__PREFIX__"
+CONFIG="/etc/dpkg-cross/crosstools"
+if [ ! -d "$CONFIG" ]; then
+ echo "No dpkg-cross found"
+ exit 0
+fi
+
+grep "^$TARGET" $CONFIG > /dev/null 2>&1
+
+if [ "$1" == "configure" -a $? -ne 0 ]; then
+ echo "$TARGET strip default $PREFIX-strip" >> $CONFIG
+fi
+
--- binutils.debian/debian/patches/00list 2006-04-21 16:37:02.000000000 +0400
+++ binutils/debian/patches/00list 2006-04-26 17:21:54.000000000 +0400
@@ -6,3 +6,4 @@
012_check_ldrunpath_length
120_mips_xgot_multigot_workaround
121_i386_x86_64_biarch
+130_uclibc_conf
--- /dev/null 2006-04-06 17:49:18.425220240 +0400
+++ binutils/debian/patches/130_uclibc_conf.dpatch 2006-04-26
17:20:34.000000000 +0400
@@ -0,0 +1,167 @@
+#!/bin/sh -e
+## 130_uclibc_conf.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: uclibc configuration.
+## DP: Author: uclibc team
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects
-patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- binutils-2.16.91.0.7/bfd/configure
++++ binutils-2.16.91.0.7/bfd/configure
+@@ -3576,7 +3576,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- binutils-2.16.91.0.7/binutils/configure
++++ binutils-2.16.91.0.7/binutils/configure
+@@ -3411,7 +3411,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- binutils-2.16.91.0.7/configure
++++ binutils-2.16.91.0.7/configure
+@@ -1270,7 +1270,7 @@
+ am33_2.0-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+- sh-*-linux*)
++ sh*-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+ sh*-*-pe|mips*-*-pe|*arm-wince-pe)
+@@ -1578,7 +1578,7 @@
+ romp-*-*)
+ noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes
target-libgloss ${libgcj}"
+ ;;
+- sh-*-* | sh64-*-*)
++ sh*-*-* | sh64-*-*)
+ case "${host}" in
+ i[3456789]86-*-vsta) ;; # don't add gprof back in
+ i[3456789]86-*-go32*) ;; # don't add gprof back in
+--- binutils-2.16.91.0.7/configure.in
++++ binutils-2.16.91.0.7/configure.in
+@@ -468,7 +468,7 @@
+ am33_2.0-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+- sh-*-linux*)
++ sh*-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+ sh*-*-pe|mips*-*-pe|*arm-wince-pe)
+@@ -776,7 +776,7 @@
+ romp-*-*)
+ noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes
target-libgloss ${libgcj}"
+ ;;
+- sh-*-* | sh64-*-*)
++ sh*-*-* | sh64-*-*)
+ case "${host}" in
+ i[[3456789]]86-*-vsta) ;; # don't add gprof back in
+ i[[3456789]]86-*-go32*) ;; # don't add gprof back in
+--- binutils-2.16.91.0.7/gas/configure
++++ binutils-2.16.91.0.7/gas/configure
+@@ -3411,7 +3411,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- binutils-2.16.91.0.7/gprof/configure
++++ binutils-2.16.91.0.7/gprof/configure
+@@ -3419,6 +3419,11 @@
+ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ ;;
+
++linux-uclibc*)
++ lt_cv_deplibs_check_method=pass_all
++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++ ;;
++
+ netbsd* | knetbsd*-gnu)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern
/lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+--- binutils-2.16.91.0.7/ld/configure
++++ binutils-2.16.91.0.7/ld/configure
+@@ -3413,7 +3413,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- binutils-2.16.91.0.7/libtool.m4
++++ binutils-2.16.91.0.7/libtool.m4
+@@ -739,7 +739,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- binutils-2.16.91.0.7/ltconfig
++++ binutils-2.16.91.0.7/ltconfig
+@@ -602,6 +602,7 @@
+
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+ case $host_os in
++linux-uclibc*) ;;
+ linux-gnu*) ;;
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+ esac
+@@ -1247,7 +1248,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+--- binutils-2.16.91.0.7/opcodes/configure
++++ binutils-2.16.91.0.7/opcodes/configure
+@@ -3579,7 +3579,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
--- binutils.debian/debian/rules 2006-04-21 16:37:02.000000000 +0400
+++ binutils/debian/rules 2006-04-26 18:42:07.000000000 +0400
@@ -38,6 +38,11 @@
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+# Introduce obfuscated host gnu type, to make sure binutils always
+# cross-build, even in case the target is exactly the same.
+DEB_HOST_OBFUSC_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE | sed 's/-/-host_/')
+DEB_BUILD_OBFUSC_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE | sed 's/-/-build_/')
+
CC = gcc
CFLAGS = -g -O2
STRIP = strip --remove-section=.comment --remove-section=.note
@@ -92,6 +97,11 @@
-rm -f $(pwd)/test-summary
-rm -fr $(d_bin) $(d_dev) $(d_mul) $(d_doc) $(d_hppa64)
-rm -rf debian/patched debian/tmp debian/files debian/substvars
+ for i in $$(find -name debian -prune -o -name '*.info*.saved' -print); \
+ do \
+ echo restore $$i; \
+ mv $$i $${i%*.saved}; \
+ done
################################################################################
@@ -138,7 +148,7 @@
mkdir builddir-multi
cd builddir-multi \
&& env CC="$(CC)" ../configure $(CONFARGS) \
- --enable-targets=alpha-linux-gnu,arm-linux-gnu,hppa-linux-gnu,i486-gnu,i486-linux-gnu,ia64-linux-gnu,m68k-linux-gnu,m68k-rtems,mips-linux-gnu,mipsel-linux-gnu,mips64-linux-gnu,mips64el-linux-gnu,powerpc-linux-gnu,powerpc64-linux-gnu,s390-linux-gnu,s390x-linux-gnu,sh-linux-gnu,sparc-linux-gnu,sparc64-linux-gnu,x86_64-linux,m32r-linux-gnu
+ --enable-targets=alpha-linux-gnu,arm-linux-gnu,hppa-linux-gnu,i486-gnu,i486-linux-gnu,ia64-linux-gnu,m68k-linux-gnu,m68k-rtems,mips-linux-gnu,mipsel-linux-gnu,mips64-linux-gnu,mips64el-linux-gnu,powerpc-linux-gnu,powerpc64-linux-gnu,s390-linux-gnu,s390x-linux-gnu,sh-linux-gnu,sparc-linux-gnu,sparc64-linux-gnu,x86_64-linux-gnu,m32r-linux-gnu
$(MAKE) -C builddir-multi configure-host
touch configure-multi-stamp
@@ -179,7 +189,7 @@
CFLAGS="$(CFLAGS)"
touch build-hppa64-stamp
-build_stamps = build-single-stamp build-multi-stamp
+build_stamps = pre-build build-single-stamp build-multi-stamp
ifeq ($(DEB_HOST_ARCH),hppa)
build_stamps += build-hppa64-stamp
endif
@@ -187,6 +197,13 @@
build-stamp: $(build_stamps)
touch build-stamp
+pre-build:
+ for i in $$(find -name debian -prune -o ! -name '*.saved' -name '*.info*' -print); do \
+ if [ ! -f $$i.saved ]; then \
+ echo "save $$i"; \
+ cp -p $$i $$i.saved; \
+ fi; \
+ done
################################################################################
@@ -339,6 +356,7 @@
dpkg-gencontrol -isp -P$(d_doc) -p$(p_doc)
chown -R root:root $(d_doc)
chmod -R go=rX $(d_doc)
+ [ -x /usr/bin/pkgstriptranslations ] && /usr/bin/pkgstriptranslations || true
dpkg --build $(d_doc) ..
################################################################################
@@ -438,6 +456,7 @@
chown -R root:root $(d_bin) $(d_dev) $(d_mul)
chmod -R go=rX $(d_bin) $(d_dev) $(d_mul)
+ [ -x /usr/bin/pkgstriptranslations ] && /usr/bin/pkgstriptranslations || true
dpkg --build $(d_bin) ..
dpkg --build $(d_dev) ..
dpkg --build $(d_mul) ..
@@ -468,7 +487,12 @@
override TARGET := $(try_convert)
endif
-p_cross = $(subst _,-,binutils-$(TARGET))
+ifdef LIBC_TARGET
+ p_suffix = $(subst _,-,$(TARGET)-$(LIBC_TARGET))
+else
+ p_suffix = $(subst _,-,$(TARGET))
+endif
+p_cross = binutils-$(p_suffix)
d_cross = debian/$(p_cross)
ifneq ($(filter sparc-linux-gnu powerpc-linux-gnu mips-linux-gnu, $(TARGET)),)
@@ -498,10 +522,30 @@
test "" != "$(TARGET)"
rm -rf configure-$(TARGET)-stamp builddir-$(TARGET)
mkdir builddir-$(TARGET)
+
+# In case of cross-compilation, we use obfuscated host gnu type,
+# to make sure binutils always builds a cross version -- even if the target
+# is exactly the same as host.
+
+ifdef LIBC_TARGET
+# Since we currently to do not support canadian builds, --build is redundant.
+# Probably, though, we should make it a parameter -- like crosstool does.
+# FIXME.
cd builddir-$(TARGET) \
- && env CC="$(CC)" ../configure --host=$(DEB_HOST_GNU_TYPE) \
- --build=$(DEB_BUILD_GNU_TYPE) --target=$(TARGET) --prefix=/usr \
+ && env CC="$(CC)" ../configure --host=$(DEB_HOST_OBFUSC_GNU_TYPE) \
+ --target=$(TARGET)-$(LIBC_TARGET) \
+ --prefix=/usr \
+ --disable-werror \
+ --enable-multilib \
+ --disable-nls \
+ $(ADDITIONAL_TARGETS)
+else
+ cd builddir-$(TARGET) \
+ && env CC="$(CC)" ../configure --host=$(DEB_HOST_OBFUSC_GNU_TYPE) \
+ --disable-werror \
+ --target=$(TARGET) --prefix=/usr \
$(ADDITIONAL_TARGETS)
+endif
touch $@
build-$(TARGET)-stamp: configure-$(TARGET)-stamp
@@ -526,10 +570,14 @@
test "" != "$(TARGET)"
sed "/^$$/ q" < debian/control > debian/control.$(TARGET)
- sed -e "s/__TARGET__/$$(echo -n $(TARGET) | sed s/_/-/g)/" \
- < debian/control.cross.in >> debian/control.$(TARGET)
+ sed -e "s/__TARGET__/$$(echo -n $(p_suffix) | sed s/_/-/g)/" \
+ < debian/control.cross.in >> debian/control.$(TARGET)
+ sed -e "s/__TARGET__/$(tmp_cpu)/" \
+ -e "s/__PREFIX__/$(p_suffix)/" < debian/cross.postinst.in \
+ > debian/cross.postinst
$(install_dir) $(d_cross)/DEBIAN
+ $(install_script) debian/cross.postinst $(d_cross)/DEBIAN/postinst
$(install_dir) $(d_cross)/usr/share/doc/$(p_cross)/
$(install_file) debian/changelog $(d_cross)/usr/share/doc/$(p_cross)/changelog.Debian
@@ -549,7 +597,8 @@
$(checkdir)
test "" != "$(TARGET)"
rm -rf $(d_cross) debian/control.$(TARGET) debian/files debian/substvars \
- builddir-$(TARGET) {configure,build,install}-$(TARGET)-stamp
+ builddir-$(TARGET) {configure,build,install}-$(TARGET)-stamp \
+ debian/cross.postinst
.PHONY: binary-cross clean-cross
--- /dev/null 2006-04-06 17:49:18.425220240 +0400
+++ binutils/debian/cross.postinst.in 2006-04-26 18:04:12.000000000 +0400
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+#set -e
+
+TARGET="__TARGET__"
+PREFIX="__PREFIX__"
+CONFIG="/etc/dpkg-cross/crosstools"
+if [ ! -d "$CONFIG" ]; then
+ echo "No dpkg-cross found"
+ exit 0
+fi
+
+grep "^$TARGET" $CONFIG > /dev/null 2>&1
+
+if [ "$1" == "configure" -a $? -ne 0 ]; then
+ echo "$TARGET strip default $PREFIX-strip" >> $CONFIG
+fi
+
--- binutils.debian/debian/patches/00list 2006-04-21 16:37:02.000000000 +0400
+++ binutils/debian/patches/00list 2006-04-26 17:21:54.000000000 +0400
@@ -6,3 +6,4 @@
012_check_ldrunpath_length
120_mips_xgot_multigot_workaround
121_i386_x86_64_biarch
+130_uclibc_conf
--- /dev/null 2006-04-06 17:49:18.425220240 +0400
+++ binutils/debian/patches/130_uclibc_conf.dpatch 2006-04-26 17:20:34.000000000 +0400
@@ -0,0 +1,167 @@
+#!/bin/sh -e
+## 130_uclibc_conf.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: uclibc configuration.
+## DP: Author: uclibc team
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- binutils-2.16.91.0.7/bfd/configure
++++ binutils-2.16.91.0.7/bfd/configure
+@@ -3576,7 +3576,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- binutils-2.16.91.0.7/binutils/configure
++++ binutils-2.16.91.0.7/binutils/configure
+@@ -3411,7 +3411,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- binutils-2.16.91.0.7/configure
++++ binutils-2.16.91.0.7/configure
+@@ -1270,7 +1270,7 @@
+ am33_2.0-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+- sh-*-linux*)
++ sh*-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+ sh*-*-pe|mips*-*-pe|*arm-wince-pe)
+@@ -1578,7 +1578,7 @@
+ romp-*-*)
+ noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
+ ;;
+- sh-*-* | sh64-*-*)
++ sh*-*-* | sh64-*-*)
+ case "${host}" in
+ i[3456789]86-*-vsta) ;; # don't add gprof back in
+ i[3456789]86-*-go32*) ;; # don't add gprof back in
+--- binutils-2.16.91.0.7/configure.in
++++ binutils-2.16.91.0.7/configure.in
+@@ -468,7 +468,7 @@
+ am33_2.0-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+- sh-*-linux*)
++ sh*-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+ sh*-*-pe|mips*-*-pe|*arm-wince-pe)
+@@ -776,7 +776,7 @@
+ romp-*-*)
+ noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
+ ;;
+- sh-*-* | sh64-*-*)
++ sh*-*-* | sh64-*-*)
+ case "${host}" in
+ i[[3456789]]86-*-vsta) ;; # don't add gprof back in
+ i[[3456789]]86-*-go32*) ;; # don't add gprof back in
+--- binutils-2.16.91.0.7/gas/configure
++++ binutils-2.16.91.0.7/gas/configure
+@@ -3411,7 +3411,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- binutils-2.16.91.0.7/gprof/configure
++++ binutils-2.16.91.0.7/gprof/configure
+@@ -3419,6 +3419,11 @@
+ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ ;;
+
++linux-uclibc*)
++ lt_cv_deplibs_check_method=pass_all
++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++ ;;
++
+ netbsd* | knetbsd*-gnu)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+--- binutils-2.16.91.0.7/ld/configure
++++ binutils-2.16.91.0.7/ld/configure
+@@ -3413,7 +3413,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- binutils-2.16.91.0.7/libtool.m4
++++ binutils-2.16.91.0.7/libtool.m4
+@@ -739,7 +739,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- binutils-2.16.91.0.7/ltconfig
++++ binutils-2.16.91.0.7/ltconfig
+@@ -602,6 +602,7 @@
+
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+ case $host_os in
++linux-uclibc*) ;;
+ linux-gnu*) ;;
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+ esac
+@@ -1247,7 +1248,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+--- binutils-2.16.91.0.7/opcodes/configure
++++ binutils-2.16.91.0.7/opcodes/configure
+@@ -3579,7 +3579,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
Reply to: