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 c1eed73edda96b2e516b51377ec94bc963911dc9..37a8673de9aa8779abe22f38f3f939bd4f8bc9e2 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 e1a7cc80b531bbb962a9b3ff6e02e9a4f62d3e07..8d85dd38652e88751a0651a05883aca439049f7c 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 c0c4482818a44cc1d158d41ad58712ddd8eae422..625f4b1ca217349d11466f71932d635e8e5529b7 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