Here is how I worked aronud it on a x86-64->i386 situation. First make sure libc6-dev-i386 is installed since we are building i386 userspace tools.
Then I used this ugly bit of shell to temporarily clean the ELF objects and modify all the makefiles under the scripts tree to build -m32 targets, restore the original makefiles, and create a tarball of the resulting ELF objects that can just be unpacked on the target where the kernel is installed, overwriting the wrong-arch binaries under the kernel-headers scripts directory. find scripts -type f | xargs file | grep ELF | cut -f1 -d: | xargs rm -f; find scripts -name Makefile | while read file; do cp -a $file $file.bak; echo 'HOST_EXTRACFLAGS += $(call cc-option,-m32)' > $file; echo 'HOST_LOADLIBES += $(call cc-option,-m32)' >> $file; cat $file.bak >> $file; done; make ARCH=i386 scripts; find scripts -name Makefile | while read file; do cp -a $file.bak $file; done; tar -cvj -f scripts.bz2 `find scripts -type f | xargs file | grep ELF | cut -f1 -d:` Maybe it can be adapted when the HOSTCC itself must be changed, I don't know. I was able to kind of shortcut it due to the x86-64 compiler being able to compile and link i386 binaries. But you will need the userspace libraries for the target installed just the same as if you were cross compiling an application. Obviously this is not a general solution that make-kpkg could adopt but maybe a starting point for discussion. -- Ryan C. Underwood, <neme...@icequake.net> -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org