From c9b284b2024e5e2fb7bacfe7f1a71a375562d281 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 5 Dec 2011 16:03:30 -0800 Subject: um: Run host archheaders, allow use of host generated headers Run the "archheaders" target for the host architecture, for architectures (like x86, now) that want to generate some of the necessary header files. Add $(HOST_DIR)/include/generated to the include path so we then pick them up. Signed-off-by: H. Peter Anvin --- arch/um/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'arch/um') diff --git a/arch/um/Makefile b/arch/um/Makefile index 7730af6ec13..00210e9bf20 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -64,7 +64,8 @@ USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\ #This will adjust *FLAGS accordingly to the platform. include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) -KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/include +KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/include \ + -I$(HOST_DIR)/include/generated # -Derrno=kernel_errno - This turns all kernel references to errno into # kernel_errno to separate them from the libc errno. This allows -fno-common @@ -96,6 +97,10 @@ endef KBUILD_KCONFIG := $(HOST_DIR)/um/Kconfig +archheaders: + $(Q)$(MAKE) -C '$(KBUILD_SRC)' KBUILD_SRC= \ + ARCH=$(SUBARCH) O='$(objtree)' archheaders + archprepare: include/generated/user_constants.h LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static -- cgit v1.2.3 From 392f4b7db82ee592cc62b813e2a127d370dea42a Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 5 Dec 2011 16:06:02 -0800 Subject: um: Generate headers before generating user-offsets.s In case we need generated header files for the values in user-offsets.h, make sure we build generated header files before user-offsets.s is built. Signed-off-by: H. Peter Anvin --- arch/um/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/um') diff --git a/arch/um/Makefile b/arch/um/Makefile index 00210e9bf20..9548ddca1a3 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -140,7 +140,7 @@ archclean: # Generated files -$(HOST_DIR)/um/user-offsets.s: FORCE +$(HOST_DIR)/um/user-offsets.s: __headers FORCE $(Q)$(MAKE) $(build)=$(HOST_DIR)/um $@ define filechk_gen-asm-offsets -- cgit v1.2.3 From 79320bcbf0d860a7cb32d6d6d464d776b9dd76ce Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 9 Dec 2011 10:59:59 -0800 Subject: um: Use $(srctree) not $(KBUILD_SRC) $(KBUILD_SRC) is not defined without O=, use $(srctree). Reported-and-tested-by: Richard Weinberger Signed-off-by: H. Peter Anvin --- arch/um/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/um') diff --git a/arch/um/Makefile b/arch/um/Makefile index 9548ddca1a3..28688e6d96d 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -98,7 +98,7 @@ endef KBUILD_KCONFIG := $(HOST_DIR)/um/Kconfig archheaders: - $(Q)$(MAKE) -C '$(KBUILD_SRC)' KBUILD_SRC= \ + $(Q)$(MAKE) -C '$(srctree)' KBUILD_SRC= \ ARCH=$(SUBARCH) O='$(objtree)' archheaders archprepare: include/generated/user_constants.h -- cgit v1.2.3