aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/Makefile')
-rw-r--r--arch/um/Makefile22
1 files changed, 13 insertions, 9 deletions
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 7492ee5837c4..7730af6ec13f 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -30,13 +30,17 @@ ifeq ($(SUBARCH),x86_64)
30 HEADER_ARCH := x86 30 HEADER_ARCH := x86
31endif 31endif
32 32
33HOST_DIR := arch/$(HEADER_ARCH)
34
33include $(srctree)/$(ARCH_DIR)/Makefile-skas 35include $(srctree)/$(ARCH_DIR)/Makefile-skas
34include $(srctree)/$(ARCH_DIR)/Makefile-$(HEADER_ARCH) 36include $(srctree)/$(HOST_DIR)/Makefile.um
37
38core-y += $(HOST_DIR)/um/
35 39
36SHARED_HEADERS := $(ARCH_DIR)/include/shared 40SHARED_HEADERS := $(ARCH_DIR)/include/shared
37ARCH_INCLUDE := -I$(srctree)/$(SHARED_HEADERS) 41ARCH_INCLUDE := -I$(srctree)/$(SHARED_HEADERS)
38ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/sys-$(HEADER_ARCH)/shared 42ARCH_INCLUDE += -I$(srctree)/$(HOST_DIR)/um/shared
39KBUILD_CPPFLAGS += -I$(srctree)/$(ARCH_DIR)/sys-$(HEADER_ARCH) 43KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/um
40 44
41# -Dvmap=kernel_vmap prevents anything from referencing the libpcap.o symbol so 45# -Dvmap=kernel_vmap prevents anything from referencing the libpcap.o symbol so
42# named - it's a common symbol in libpcap, so we get a binary which crashes. 46# named - it's a common symbol in libpcap, so we get a binary which crashes.
@@ -60,7 +64,7 @@ USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\
60#This will adjust *FLAGS accordingly to the platform. 64#This will adjust *FLAGS accordingly to the platform.
61include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) 65include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)
62 66
63KBUILD_CPPFLAGS += -I$(srctree)/arch/$(HEADER_ARCH)/include 67KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/include
64 68
65# -Derrno=kernel_errno - This turns all kernel references to errno into 69# -Derrno=kernel_errno - This turns all kernel references to errno into
66# kernel_errno to separate them from the libc errno. This allows -fno-common 70# kernel_errno to separate them from the libc errno. This allows -fno-common
@@ -90,7 +94,7 @@ define archhelp
90 echo ' find in the kernel root.' 94 echo ' find in the kernel root.'
91endef 95endef
92 96
93KBUILD_KCONFIG := arch/um/Kconfig.$(HEADER_ARCH) 97KBUILD_KCONFIG := $(HOST_DIR)/um/Kconfig
94 98
95archprepare: include/generated/user_constants.h 99archprepare: include/generated/user_constants.h
96 100
@@ -131,8 +135,8 @@ archclean:
131 135
132# Generated files 136# Generated files
133 137
134$(ARCH_DIR)/sys-$(HEADER_ARCH)/user-offsets.s: FORCE 138$(HOST_DIR)/um/user-offsets.s: FORCE
135 $(Q)$(MAKE) $(build)=$(ARCH_DIR)/sys-$(HEADER_ARCH) $@ 139 $(Q)$(MAKE) $(build)=$(HOST_DIR)/um $@
136 140
137define filechk_gen-asm-offsets 141define filechk_gen-asm-offsets
138 (set -e; \ 142 (set -e; \
@@ -147,7 +151,7 @@ define filechk_gen-asm-offsets
147 echo ""; ) 151 echo ""; )
148endef 152endef
149 153
150include/generated/user_constants.h: $(ARCH_DIR)/sys-$(HEADER_ARCH)/user-offsets.s 154include/generated/user_constants.h: $(HOST_DIR)/um/user-offsets.s
151 $(call filechk,gen-asm-offsets) 155 $(call filechk,gen-asm-offsets)
152 156
153export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH DEV_NULL_PATH 157export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS DEV_NULL_PATH