From: Ian Jackson Date: Sun, 22 Jan 2017 12:45:50 +0000 (+0000) Subject: Fix FTCBFS: Use triplet-prefixed build tools. Patch from Helmut Grohne. Closes:... X-Git-Tag: debian/2.1.2~3 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=authbind.git;a=commitdiff_plain;h=89f63ba8c7025f91bb40c532bd531db562e6e61c;hp=177b6e8b804eaf719774eecc6e24a85190a6d89d Fix FTCBFS: Use triplet-prefixed build tools. Patch from Helmut Grohne. Closes: #851206. --- 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