From: Russ Allbery Date: Thu, 24 Jul 2008 17:13:25 +0000 (-0700) Subject: Use ARCH in preference to uname -m when building kernel modules X-Git-Tag: debian/1.4.7.dfsg1-5~1 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=1d8e6e9685a9ab85d08cf296bfff7dec7a54b729;p=packages%2Fo%2Fopenafs.git Use ARCH in preference to uname -m when building kernel modules * When building the kernel module, use the setting of the ARCH environment or make variable, if present, in preference to uname -m to allow cross-compiles. Thanks, Jose Calhariz. (Closes: #492232) --- diff --git a/debian/changelog b/debian/changelog index 5a642ff9f..edf6996cd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,9 @@ openafs (1.4.7.dfsg1-5) unstable; urgency=low and builds without UCONTEXT fail. The binaries we were building before didn't work and no one reported a bug, indicating no one was attempting to use OpenAFS on hppa. + * When building the kernel module, use the setting of the ARCH + environment or make variable, if present, in preference to uname -m to + allow cross-compiles. Thanks, Jose Calhariz. (Closes: #492232) * Add Jason Edgecomb's copyright and license for man pages to debian/copyright. diff --git a/debian/module/rules b/debian/module/rules index 99a2da166..6329f6710 100755 --- a/debian/module/rules +++ b/debian/module/rules @@ -41,7 +41,8 @@ export KSRC export KVERS export KPKG_DEST_DIR -SYS_NAME := $(shell KSRC="$(KSRC)" KVERS="$(KVERS)" sh debian/sysname) +SYS_NAME := $(shell KSRC="$(KSRC)" KVERS="$(KVERS)" ARCH="$(ARCH)" \ + sh debian/sysname) package = openafs modulepkg := openafs-modules-$(KVERS)${INT_SUBARCH} diff --git a/debian/module/sysname b/debian/module/sysname index c745af6af..288f408e2 100755 --- a/debian/module/sysname +++ b/debian/module/sysname @@ -7,7 +7,7 @@ if [ x"$KVERS" = x ] ; then exit 1 fi -case `uname -m` in +case ${ARCH:-`uname -m`} in alpha) case $KVERS in 2.2*)