Source: gzip Version: 1.4-1 Severity: wishlist Tags: patch User: crosscomp...@debian.org Usertags: cross
When cross-compiling, the DEB_BUILD_ARCH variable describes the system on which the compile is running, while DEB_HOST_ARCH describes the system on which the binaries will be installed. Since CFLAGS is used when building binaries for the target system, the check for -DUNALIGNED_OK should be based on DEB_HOST_ARCH, as per the attached patch. Cheers, Kyle Moffett -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (700, 'testing'), (700, 'stable'), (600, 'unstable'), (500, 'stable-updates'), (500, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash
diff -ruN gzip-1.4.orig/debian/rules gzip-1.4/debian/rules --- gzip-1.4.orig/debian/rules 2011-10-08 21:44:59.000000000 -0400 +++ gzip-1.4/debian/rules 2011-10-08 21:45:58.000000000 -0400 @@ -11,8 +11,7 @@ CONFARGS = --host=$(DEB_HOST_GNU_TYPE) endif -buildarch := $(shell dpkg-architecture -qDEB_BUILD_ARCH) -ifeq ($(buildarch),amd64) +ifeq ($(shell dpkg-architecture -qDEB_HOST_ARCH),amd64) CFLAGS=-g -O2 -Wall -DUNALIGNED_OK else CFLAGS=-g -O2 -Wall