[PATCH] biarch compiler support for i386

From: H. Peter Anvin
Date: Tue Apr 05 2005 - 01:16:15 EST


This allows the i386 architecture to be built on a system with a biarch compiler that defaults to x86-64, merely by specifying ARCH=i386.

As previously discussed, this uses the equivalent logic to the ppc port.

-hpa

Signed-Off-By: H. Peter Anvin <hpa@xxxxxxxxx> Index: linux-2.5/arch/i386/Makefile
===================================================================
RCS file: /home/hpa/kernel/bkcvs/linux-2.5/arch/i386/Makefile,v
retrieving revision 1.75
diff -u -r1.75 Makefile
--- linux-2.5/arch/i386/Makefile 12 Mar 2005 22:03:27 -0000 1.75
+++ linux-2.5/arch/i386/Makefile 5 Apr 2005 05:29:20 -0000
@@ -17,6 +17,13 @@
# Kianusch Sayah Karadji <kianusch@xxxxxxxxxxx>
# Added support for GEODE CPU

+HAS_BIARCH := $(call cc-option-yn, -m32)
+ifeq ($(HAS_BIARCH),y)
+AS := $(AS) --32
+LD := $(LD) -m elf_i386
+CC := $(CC) -m32
+endif
+
LDFLAGS := -m elf_i386
OBJCOPYFLAGS := -O binary -R .note -R .comment -S
LDFLAGS_vmlinux :=