From 190fdf431e65f0276ce3c8c566248582f7c95abe Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 24 Jan 2017 14:20:27 +0000 Subject: [PATCH] Honour dpkg-architecture's DEB_HOST_GNU_TYPE, to fix cross-building. --- debian/changelog | 1 + debian/rules | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index 217cc5a..706198f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Tue, 24 Jan 2017 13:14:06 +0000 diff --git a/debian/rules b/debian/rules index faa763a..f5d4a2a 100755 --- a/debian/rules +++ b/debian/rules @@ -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 -- 2.30.2