android_kernel_xiaomi_sm7250/arch/um/Makefile-x86_64
Paolo 'Blaisorblade' Giarrusso 20d0021394 [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 <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-14 09:00:25 -07:00

35 lines
934 B
Plaintext

# Copyright 2003 - 2004 Pathscale, Inc
# Released under the GPL
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)
USER_CFLAGS += -fno-builtin
ELF_ARCH := i386:x86-64
ELF_FORMAT := elf64-x86-64
SYS_UTIL_DIR := $(ARCH_DIR)/sys-x86_64/util
SYS_DIR := $(ARCH_DIR)/include/sysdep-x86_64
SYS_HEADERS = $(SYS_DIR)/sc.h $(SYS_DIR)/thread.h
prepare: $(SYS_HEADERS)
$(SYS_DIR)/sc.h: $(SYS_UTIL_DIR)/mk_sc
$(call filechk,gen_header)
$(SYS_DIR)/thread.h: $(SYS_UTIL_DIR)/mk_thread
$(call filechk,gen_header)
$(SYS_UTIL_DIR)/mk_sc: scripts_basic $(ARCH_DIR)/user-offsets.h FORCE
$(Q)$(MAKE) $(build)=$(SYS_UTIL_DIR) $@
$(SYS_UTIL_DIR)/mk_thread: scripts_basic $(GEN_HEADERS) $(ARCH_DIR)/kernel-offsets.h FORCE
$(Q)$(MAKE) $(build)=$(SYS_UTIL_DIR) $@
CLEAN_FILES += $(SYS_HEADERS)