[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#836544: libutempter FTCBFS: uses build architecture compiler



Source: libutempter
Version: 1.1.6-3
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap

libutempter fails to cross build from source, because it uses the build
architecture compiler. The later dh_strip (which uses host architecture
tools) fails operating on the generated ELF objects. The attached patch
supplies a triplet-prefixed CC variable and allows overriding CC for use
with e.g. clang based builds. Please consider applying it.

Helmut
diff --minimal -Nru libutempter-1.1.6/debian/changelog libutempter-1.1.6/debian/changelog
--- libutempter-1.1.6/debian/changelog	2016-02-18 19:47:33.000000000 +0100
+++ libutempter-1.1.6/debian/changelog	2016-09-03 22:47:11.000000000 +0200
@@ -1,3 +1,10 @@
+libutempter (1.1.6-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Pass triplet-prefixed CC to make. (Closes: #-1)
+
+ -- Helmut Grohne <helmut@subdivi.de>  Sat, 03 Sep 2016 22:46:56 +0200
+
 libutempter (1.1.6-3) unstable; urgency=medium
 
   * Team upload.
diff --minimal -Nru libutempter-1.1.6/debian/rules libutempter-1.1.6/debian/rules
--- libutempter-1.1.6/debian/rules	2016-02-18 19:47:33.000000000 +0100
+++ libutempter-1.1.6/debian/rules	2016-09-03 22:46:48.000000000 +0200
@@ -1,10 +1,17 @@
 #!/usr/bin/make -f
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+pie,+bindnow
+include /usr/share/dpkg/architecture.mk
+ifeq ($(origin CC),default)
+	CC=$(DEB_HOST_GNU_TYPE)-gcc
+endif
 
 %:
 	dh $@ --parallel --list-missing
 
+override_dh_auto_build:
+	dh_auto_build -- CC=$(CC)
+
 override_dh_fixperms:
 	dh_fixperms
 	chown root:utmp debian/libutempter0/usr/lib/$(DEB_HOST_MULTIARCH)/utempter/utempter

Reply to: