Source: hdparm
Version: 9.48+ds-1
Tags: patch
User: [email protected]
Usertags: rebootstrap

hdparm fails to cross build from source, because it uses the build
architecture compiler and then dh_strip fails when using host
architecture tools on the wrong architecture hdparm executable.

The attached patch addresses the following issues:
 * Pass triplet-prefixed CC to make. This works for both cross and
   native compilation. Due to the origin check, it also improves on
   building with clang.
 * Nullify stripping during build. It was the build architecture strip
   as well, thus failing. But it also prevents generating a -dbgsym
   package. Currently, there is neither -dbg nor -dbgsym package.

Please consider applying the patch.

Helmut
diff --minimal -Nru hdparm-9.48+ds/debian/changelog 
hdparm-9.48+ds/debian/changelog
--- hdparm-9.48+ds/debian/changelog     2016-03-17 11:18:55.000000000 +0100
+++ hdparm-9.48+ds/debian/changelog     2016-09-03 16:13:19.000000000 +0200
@@ -1,3 +1,12 @@
+hdparm (9.48+ds-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS. Closes: #-1
+    + Pass triplet-prefixed CC to make
+    + Do not strip during build
+
+ -- Helmut Grohne <[email protected]>  Sat, 03 Sep 2016 16:12:16 +0200
+
 hdparm (9.48+ds-1) unstable; urgency=medium
 
   [ Alexandre Mestiashvili ]
diff --minimal -Nru hdparm-9.48+ds/debian/rules hdparm-9.48+ds/debian/rules
--- hdparm-9.48+ds/debian/rules 2016-03-17 11:18:55.000000000 +0100
+++ hdparm-9.48+ds/debian/rules 2016-09-03 16:12:14.000000000 +0200
@@ -1,9 +1,16 @@
 #!/usr/bin/make -f
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+include /usr/share/dpkg/architecture.mk
+ifeq ($(origin CC),default)
+       CC = $(DEB_HOST_GNU_TYPE)-gcc
+endif
 
 %:
        dh $@
 
+override_dh_auto_build:
+       dh_auto_build -- CC=$(CC) STRIP=:
+
 override_dh_installudev:
        dh_installudev --priority=85

Reply via email to