diff -u binutils-2.20.1/debian/rules binutils-2.20.1/debian/rules --- binutils-2.20.1/debian/rules +++ binutils-2.20.1/debian/rules @@ -1034,6 +1034,18 @@ ADDITIONAL_TARGETS = --enable-targets=s390-linux-gnu endif +# During the opcodes cross-builds on amd64, configure tries running "as" +# against the newly built libbfd which doesn't support x86-64; this is probably +# because the newly built libs get prepended to the lib path; upstream suggests +# using a different SONAME for libbfds with differing features, but this is +# unpractical for us; the workaround below adds support for the build triplet +# in the target libbfd, but this is a functional change over a natively built +# binutils and should be fixed differently +# see https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/548451 +ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) +ADDITIONAL_TARGETS += --enable-targets=$(DEB_BUILD_GNU_TYPE) +endif + #----------------------------------------------------------------- # sysroot options ifdef WITH_SYSROOT