]> git.hungrycats.org Git - linux/commitdiff
[PATCH] fix non-ia32 `make rpm'
authorAndrew Morton <akpm@osdl.org>
Tue, 30 Dec 2003 07:40:31 +0000 (23:40 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 30 Dec 2003 07:40:31 +0000 (23:40 -0800)
From: "Zhu, Yi" <yi.zhu@intel.com>

The "make rpm" rule in top Makefile isn't aware of the enviorment ARCH.  For
example, people issue "make ARCH=ia64" to compile the ia64 kernel on i386
platform for cross compilation.  This works pretty well now.  But if one uses
"make rpm ARCH=ia64", it will fail.  Because current rpm rule in Makefile and
mkspec are not aware of ARCH.

Makefile
scripts/mkspec

index 2b2b841b7e5ff2e058a19078b777d563c34c37cc..c8ebe5b1f0f9eb3ad349b4d2d3b04e653887a4cd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -878,7 +878,7 @@ rpm:        clean spec
        $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version;\
        mv -f $(objtree)/.tmp_version $(objtree)/.version;
 
-       $(RPM) -ta ../$(KERNELPATH).tar.gz
+       $(RPM) --target $(UTS_MACHINE) -ta ../$(KERNELPATH).tar.gz
        rm ../$(KERNELPATH).tar.gz
 
 # Brief documentation of the typical targets used
index 841512debca535aa5e2ea449e001f460a22b47ab..e1ecb505e2748e78fbdd245ef0a8d24e800e3f12 100755 (executable)
@@ -9,7 +9,7 @@
 #      Patched for non-x86 by Opencon (L) 2002 <opencon@rio.skydome.net>
 #
 # That's the voodoo to see if it's a x86.
-ISX86=`arch | grep -ie i.86`
+ISX86=`echo ${ARCH:=\`arch\`} | grep -ie i.86`
 if [ ! -z $ISX86 ]; then
        PC=1
 else