From: "Zhu, Yi" 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 | 2 +- scripts/mkspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff -puN Makefile~non-ia32-make-rpm-fix Makefile --- 25/Makefile~non-ia32-make-rpm-fix 2003-12-28 23:23:07.000000000 -0800 +++ 25-akpm/Makefile 2003-12-28 23:23:07.000000000 -0800 @@ -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 diff -puN scripts/mkspec~non-ia32-make-rpm-fix scripts/mkspec --- 25/scripts/mkspec~non-ia32-make-rpm-fix 2003-12-28 23:23:07.000000000 -0800 +++ 25-akpm/scripts/mkspec 2003-12-28 23:23:07.000000000 -0800 @@ -9,7 +9,7 @@ # Patched for non-x86 by Opencon (L) 2002 # # 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 _