Source: upx-ucl Version: 3.94-2 Tags: patch User: helm...@debian.org Usertags: rebootstrap
upx-ucl fails to cross build from source, because debian/rules hard codes the build architecture compiler. Deferring compiler choice to debhelper fixes that. It also confuses build and host, so whenever the build endianess differs from the host endianess, garbage will be compiled. Deferring endianess to dpkg is much more maintaineable than keeping an incomplete list of big endian architectures. Please consider applying the attached patch. Helmut
diff --minimal -Nru upx-ucl-3.94/debian/changelog upx-ucl-3.94/debian/changelog --- upx-ucl-3.94/debian/changelog 2017-08-09 22:59:28.000000000 +0200 +++ upx-ucl-3.94/debian/changelog 2017-08-10 09:33:49.000000000 +0200 @@ -1,3 +1,13 @@ +upx-ucl (3.94-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let debhelper choose the correct CC + + Fix build/host confusion + + Ask dpkg for host endianess rather than maintaining a list + + -- Helmut Grohne <hel...@subdivi.de> Thu, 10 Aug 2017 09:33:49 +0200 + upx-ucl (3.94-2) unstable; urgency=low * Upload to unstable. diff --minimal -Nru upx-ucl-3.94/debian/rules upx-ucl-3.94/debian/rules --- upx-ucl-3.94/debian/rules 2017-08-09 22:59:28.000000000 +0200 +++ upx-ucl-3.94/debian/rules 2017-08-10 09:33:48.000000000 +0200 @@ -4,14 +4,11 @@ package := $(shell dh_listpackages) -BIG_ENDIAN_ARCHS := hppa ia64 sparc sparc64 -DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) +include /usr/share/dpkg/architecture.mk export DEB_BUILD_MAINT_OPTIONS=hardening=+all export DESTDIR := $(CURDIR)/debian/$(package) -export CC := gcc -export CXX := g++ # Note: `export USE_GNUC := 1' may be needed if CXX is changed to e.g. g++-$version export UPX_UCLDIR := /none export UPX_LZMADIR := /usr/include/lzma @@ -19,7 +16,7 @@ export CPPFLAGS := -DWITH_UCL -D_FILE_OFFSET_BITS=64 \ $(shell dpkg-buildflags --get CPPFLAGS) export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) -ifneq (,$(findstring $(DEB_BUILD_ARCH), $(BIG_ENDIAN_ARCHS))) +ifeq ($(DEB_HOST_ARCH_ENDIAN),big) CPPFLAGS += -D__BIG_ENDIAN__=1 endif @@ -28,7 +25,7 @@ override_dh_auto_build: # Add here commands to compile the package. - @echo "Starting build process ($(DEB_BUILD_ARCH))" + @echo "Starting build process ($(DEB_HOST_ARCH))" dh_auto_build $(DH_AUTO_OPTIONS) -- \ CXXFLAGS_OPTIMIZE= \ CHECK_WHITESPACE= \