Package: pciutils
Version: 1:3.1.9-6
Severity: normal
Tags: patch
User: crossbu...@debian.org
Usertags: cross

pciutils fails to cross-build as follows:

  /usr/bin/make CC=arm-linux-gnueabihf-gcc LIBDIR=/usr/lib/arm-linux-gnueabihf 
PREFIX=/usr SBINDIR=/usr/bin IDSDIR=/usr/share/misc install 
DESTDIR=debian/pciutils
  make[1]: Entering directory `/«PKGBUILDDIR»'
  /usr/bin/make -C lib all
  make[2]: Entering directory `/«PKGBUILDDIR»/lib'
  make[2]: Nothing to be done for `all'.
  make[2]: Leaving directory `/«PKGBUILDDIR»/lib'
  install -d -m 755 debian/pciutils/usr/bin debian/pciutils/usr/share/misc 
debian/pciutils/usr/share/man/man8 debian/pciutils/usr/share/man/man7
  install -c -m 755 -s lspci setpci pcimodules debian/pciutils/usr/bin
  strip: Unable to recognise the format of the input file 
`debian/pciutils/usr/bin/lspci'

For the same underlying reason, this package fails to honour
DEB_BUILD_OPTIONS=nostrip even when not cross-building.

The following patch fixes this.  I also noticed that the build was
calling ar and ranlib rather than (in my configuration)
arm-linux-gnueabihf-ar and arm-linux-gnueabihf-ranlib, and I fixed the
previous cross-building patch to take account of that too.

  * Set CROSS_COMPILE rather than CC when cross-building, so that we use the
    correct ar and ranlib too.
  * Tell the upstream build system not to strip binaries when installing
    them; dh_strip will handle that, using the correct strip program and
    honouring DEB_BUILD_OPTIONS=nostrip.

diff -Nru pciutils-3.1.9/debian/rules pciutils-3.1.9/debian/rules
--- pciutils-3.1.9/debian/rules 2012-06-14 03:17:17.000000000 +0100
+++ pciutils-3.1.9/debian/rules 2012-12-01 23:46:38.000000000 +0000
@@ -11,7 +11,7 @@
 DEB_HOST_MULTIARCH=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
 ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
-CROSS=CC=$(DEB_HOST_GNU_TYPE)-gcc
+CROSS=CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)-
 endif
 
 PATHS := LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) PREFIX=/usr SBINDIR=/usr/bin 
IDSDIR=/usr/share/misc
@@ -47,7 +47,7 @@
        dh_prep
        dh_installdirs -a
 
-       $(MAKE) $(CROSS) $(PATHS) install DESTDIR=debian/pciutils
+       $(MAKE) $(CROSS) $(PATHS) install DESTDIR=debian/pciutils STRIP=
 
        # pciutils
        gunzip debian/pciutils/usr/share/misc/pci.ids.gz

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

Reply via email to