chiark / gitweb /
Honour dpkg-architecture's DEB_HOST_GNU_TYPE, to fix cross-building.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 24 Jan 2017 14:20:27 +0000 (14:20 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 24 Jan 2017 14:26:35 +0000 (14:26 +0000)
debian/changelog
debian/rules

index 217cc5a06c6a49c3b37576fb57be5bab30600417..706198ff91da781ad31c619497d5e7c2f0d6191a 100644 (file)
@@ -8,6 +8,7 @@ chiark-tcl (1.1.4~~iwj) UNRELEASED; urgency=low
     this change fixes the FTBFS on Debian hurd-* and kfreebsd-*.
   * Update build-dependencies to permit tcl8.6.  Closes:#818475.
   * Replace ad-hocery with use of offsetof/typeof.  Closes:#812718.
+  * Honour dpkg-architecture's DEB_HOST_GNU_TYPE, to fix cross-building.
 
  -- Ian Jackson <ijackson@chiark.greenend.org.uk>  Tue, 24 Jan 2017 13:14:06 +0000
 
index faa763a91b3e1456da41e07357b9a82e80f2e757..f5d4a2af04e6afb48f73af376bb78eb5ff02a622 100755 (executable)
@@ -26,6 +26,15 @@ docdir=usr/share/doc/$(docpackage)
 tclh:=$(firstword $(wildcard /usr/include/tcl8.*/tcl.h))
 tclversion:=$(patsubst /usr/include/tcl%/tcl.h,%,$(tclh))
 
+garch := $(shell dpkg-architecture -q DEB_HOST_GNU_TYPE)
+ifneq ($(garch),)
+
+ifeq ($(origin CC),default)
+export CC=$(garch)-gcc
+endif
+
+endif # $garch
+
 define checkdir
        test -f hbytes/hbytes.tct
 endef