Source: binutils Version: 2.30-5 Severity: normal Tags: patch User: [email protected] Usertags: rebootstrap
When building cross binutils for a single target (by setting the TARGET environment variable or writing to debian/target), one needs the binutils-for-host package for the TARGET architecture. Thus such targeted build should emit emit binutils-for-host:$DEB_TARGET_ARCH rather than binutils-for-host:$DEB_HOST_ARCH. (For non-targeted builds there is no difference.) Please consider applying the attached patch. Helmut
--- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +binutils (2.30-5.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Build binutils-for-host for TARGET. (Closes: #-1) + + -- Helmut Grohne <[email protected]> Thu, 01 Mar 2018 20:03:17 +0100 + binutils (2.30-5) unstable; urgency=medium * Update, taken from the 2.30 branch 20180215. --- a/debian/rules +++ b/debian/rules @@ -209,9 +209,11 @@ DPKG_TARGET_VARS := $(shell dpkg-architecture -f -t$(TARGET)) DEB_TARGET_MULTIARCH = $(call vafilt,$(DPKG_TARGET_VARS),DEB_HOST_MULTIARCH) DEB_TARGET_ARCH = $(call vafilt,$(DPKG_TARGET_VARS),DEB_HOST_ARCH) + for_target = dpkg-architecture -f -t$(TARGET) -c else DEB_TARGET_MULTIARCH = $(DEB_HOST_MULTIARCH) DEB_TARGET_ARCH = $(DEB_HOST_ARCH) + for_target = endif ifneq (,$(TARGET)) @@ -1422,8 +1424,9 @@ ln -sf $(p_com) $(d_hst)/$(PF)/share/doc/$(p_hst) rm -f debian/substvars - dpkg-gencontrol -P$(d_hst) -p$(p_hst) \ - -Vbinutils:native=$(p_nat) -Vbinutils:minver=$(min_ver) + $(for_target) dpkg-gencontrol -P$(d_hst) -p$(p_hst) \ + -Vbinutils:native=$(if $(TARGET),$(p_cross),$(p_nat)) \ + -Vbinutils:minver=$(min_ver) chown -R root:root $(d_hst) chmod -R go=rX $(d_hst)

