From: Tony Lindgren I used to be be able to cross compile for i386 on my x86_64 machine, but recently something (gcc/binutils?) changed, and it stopped working. Following patch makes cross compile work with: make ARCH=i386 CFLAGS_KERNEL="-m32" AFLAGS_KERNEL="-m32" bzImage Without the patch I'm getting the following error: SYSCALL arch/i386/kernel/vsyscall-syms.o /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: Relocatable linking with relocations from format elf32-i386 (arch/i386/kernel/vsyscall-sysenter.o) to format elf64-x86-64 (arch/i386/kernel/vsyscall-syms.o) is not supported collect2: ld returned 1 exit status Signed-off-by: Andrew Morton --- 25-akpm/arch/i386/kernel/Makefile | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN arch/i386/kernel/Makefile~trivial-fix-for-i386-cross-compile arch/i386/kernel/Makefile --- 25/arch/i386/kernel/Makefile~trivial-fix-for-i386-cross-compile 2005-01-25 21:21:12.822759584 -0800 +++ 25-akpm/arch/i386/kernel/Makefile 2005-01-25 21:21:12.825759128 -0800 @@ -46,7 +46,7 @@ targets += vsyscall.lds # The DSO images are built using a special linker script. quiet_cmd_syscall = SYSCALL $@ - cmd_syscall = $(CC) -nostdlib $(SYSCFLAGS_$(@F)) \ + cmd_syscall = $(CC) -m elf_i386 -nostdlib $(SYSCFLAGS_$(@F)) \ -Wl,-T,$(filter-out FORCE,$^) -o $@ export CPPFLAGS_vsyscall.lds += -P -C -U$(ARCH) _