From bb33421dde79f9a36d5485c56335ff178ac7d268 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Wed, 11 Jan 2006 22:43:54 +0100 Subject: [PATCH] x86_64: Allow compilation on a 32bit biarch toolchain This might help on distributions that use a 32bit biarch compiler. First pass -m64 by default. Secondly add some more .code32s because at least the Ubuntu biarch 32bit as called by gcc doesn't seem to handle -m64 -m32 as generated by the Makefile without such assistance. And finally make sure the linker script can be preprocessed with a 32bit cpp. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- arch/x86_64/Makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/x86_64/Makefile') diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile index 2d3e9be229c..d7fd46479c5 100644 --- a/arch/x86_64/Makefile +++ b/arch/x86_64/Makefile @@ -31,6 +31,7 @@ cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona) CFLAGS += $(cflags-y) +CFLAGS += -m64 CFLAGS += -mno-red-zone CFLAGS += -mcmodel=kernel CFLAGS += -pipe @@ -52,6 +53,8 @@ CFLAGS += $(call cc-option,-funit-at-a-time) # prevent gcc from generating any FP code by mistake CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,) +AFLAGS += -m64 + head-y := arch/x86_64/kernel/head.o arch/x86_64/kernel/head64.o arch/x86_64/kernel/init_task.o libs-y += arch/x86_64/lib/ -- cgit v1.2.3