summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2017-01-22 12:45:50 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2017-01-22 12:45:50 +0000
commit89f63ba8c7025f91bb40c532bd531db562e6e61c (patch)
tree542561ab0494101e64ee01fb1e7cec3ef3116128
parent177b6e8b804eaf719774eecc6e24a85190a6d89d (diff)
Fix FTCBFS: Use triplet-prefixed build tools. Patch from Helmut Grohne. Closes: #851206.
-rw-r--r--Makefile2
-rw-r--r--debian/changelog2
-rwxr-xr-xdebian/rules14
3 files changed, 13 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index c1eed73..37a8673 100644
--- a/Makefile
+++ b/Makefile
@@ -82,7 +82,7 @@ helper: helper.o
helper.o authbind.o: authbind.h
$(LIBTARGET): libauthbind.o
- ld -shared -soname $(LIBCANON) -o $@ $< $(LIBS)
+ $(LD) -shared -soname $(LIBCANON) -o $@ $< $(LIBS)
clean distclean:
rm -f $(TARGETS) *.o *~ ./#*# *.bak *.new core
diff --git a/debian/changelog b/debian/changelog
index e1a7cc8..8d85dd3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ authbind (2.1.2) unstable; urgency=low
true.) Patch from Marco d'Itri, slightly modified. Closes:#765587.
* Fix one-letter typo in previous changelog entry.
* Add -n to gzip -9 rune, to help reproducibility. Closes:#777727.
+ * Fix FTCBFS: Use triplet-prefixed build tools.
+ Patch from Helmut Grohne. Closes: #851206.
--
diff --git a/debian/rules b/debian/rules
index c0c4482..625f4b1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -20,7 +20,13 @@
#
# $Id$
-CC= gcc
+-include /usr/share/dpkg/architecture.mk
+ifneq ($(DEB_HOST_GNU_TYPE),)
+TOOL_PREFIX=$(DEB_HOST_GNU_TYPE)-
+endif
+ifeq ($(origin CC),default)
+CC=$(TOOL_PREFIX)gcc
+endif
SHELL=/bin/bash
package=authbind
@@ -45,8 +51,8 @@ CFLAGS += -g
LDFLAGS += -g
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-INSTALL_PROGRAM += -s
-STRIP=strip
+STRIP=$(TOOL_PREFIX)strip
+INSTALL_PROGRAM += -s --strip-program=$(STRIP)
else
STRIP=:
endif
@@ -62,7 +68,7 @@ export STRIP
build:
- $(MAKE) prefix=/usr
+ $(MAKE) prefix=/usr CC='$(CC)' LD='$(TOOL_PREFIX)ld'
clean:
$(MAKE) distclean