biarch compiler support for i386
PATCH 1/1 biarch compiler support for i386
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
Index: linux-2.5/arch/i386/Makefile
===================================================================
RCS file: /home/hpa/kernel/bkcvs/linux-2.5/arch/i386/Makefile,v retrieving revision 1.75
arch/i386/Makefile +7 -0
@@ -17,6 +17,13 @@ # Kianusch Sayah Karadji <[email protected]> # 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 :=
Quoted 4 lines · H. Peter Anvin
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.
Given that the same logic applies to various other ports maybe it should go into a common Makefile fragment?
Quoted 2 lines · Christoph Hellwig
Given that the same logic applies to various other ports maybe it should go into a common
Makefilefragment?
Alas, the *details* are different for each architecture.
-hpa