chiark / gitweb /
Fix FTCBFS: Use triplet-prefixed build tools. Patch from Helmut Grohne. Closes:...
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 22 Jan 2017 12:45:50 +0000 (12:45 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 22 Jan 2017 12:45:50 +0000 (12:45 +0000)
Makefile
debian/changelog
debian/rules

index c1eed73..37a8673 100644 (file)
--- 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
index e1a7cc8..8d85dd3 100644 (file)
@@ -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.
 
  --
 
index c0c4482..625f4b1 100755 (executable)
 #
 # $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