From 20d0021394c1b070bf04b22c5bc8fdb437edd4c5 Mon Sep 17 00:00:00 2001 From: Paolo 'Blaisorblade' Giarrusso Date: Thu, 14 Jul 2005 00:33:43 -0700 Subject: [PATCH] uml: allow building as 32-bit binary on 64bit host This patch makes the command: make ARCH=um SUBARCH=i386 work on x86_64 hosts (with support for building 32-bit binaries). This is especially needed since 64-bit UMLs don't support 32-bit emulation for guest binaries, currently. This has been tested in all possible cases and works. Only exception is that I've built but not tested a 64-bit binary, because I hadn't a 64-bit filesystem available. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Cc: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/Makefile-x86_64 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'arch/um/Makefile-x86_64') diff --git a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64 index d80bd0052e6..aa2f7174ebc 100644 --- a/arch/um/Makefile-x86_64 +++ b/arch/um/Makefile-x86_64 @@ -1,11 +1,13 @@ # Copyright 2003 - 2004 Pathscale, Inc # Released under the GPL -SUBARCH_LIBS := arch/um/sys-x86_64/ +libs-y += arch/um/sys-x86_64/ START := 0x60000000 +#We #undef __x86_64__ for kernelspace, not for userspace where +#it's needed for headers to work! CFLAGS += -U__$(SUBARCH)__ -fno-builtin $(STUB_CFLAGS) -ARCH_USER_CFLAGS := -D__x86_64__ +USER_CFLAGS += -fno-builtin ELF_ARCH := i386:x86-64 ELF_FORMAT := elf64-x86-64 -- cgit v1.2.3