On Tue, Nov 08, 2011 at 01:26:51PM +0000, Colin Watson wrote: > The attached patch makes it possible to cross-build iputils given a > suitable cross-building environment. Please see: > > https://bugs.launchpad.net/ubuntu/+source/iputils/+bug/872370 > > The small upstream patch should be reasonably maintainable, but I think > it should also be reasonably portable if you want to forward it on to > upstream. As far as I can tell there is no way to cause -lfoo in a make > prerequisite to do the right thing for cross-building.
This is still needed with the latest version, although the dpkg-buildflags work in 3:20101006-2 means that cross-building.diff is no longer necessary. Here's an updated version. Please could you review this, as iputils is part of the base system and useful to cross-build? * Support cross-building (thanks to Wookey <woo...@wookware.org> and Harry Liebel; LP: #872370). diff -Nru iputils-20121221/debian/rules iputils-20121221/debian/rules --- iputils-20121221/debian/rules 2013-05-15 08:07:26.000000000 +0100 +++ iputils-20121221/debian/rules 2013-05-16 15:38:56.000000000 +0100 @@ -10,12 +10,20 @@ # This has to be exported to make some magic below work. export DH_OPTIONS +DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) + CROSS := +else + CROSS := CC=$(DEB_HOST_GNU_TYPE)-gcc +endif + configure: dh_testdir build-arch: configure dh_testdir - $(MAKE) + $(MAKE) $(CROSS) build-indep: configure dh_testdir Thanks, -- Colin Watson [cjwat...@ubuntu.com] -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org