Commit 60df1aee authored by Masahiro Yamada's avatar Masahiro Yamada

kbuild: move modpost out of 'scripts' target

I am eagar to build under the scripts/ directory only with $(HOSTCC),
but scripts/mod/ highly depends on the $(CC) and target arch headers.
That it why the 'scripts' target must depend on 'asm-generic',
'gcc-plugins', and $(autoksyms_h).

Move it to the 'prepare0' stage. I know this is a cheesy workaround,
but better than the current situation.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 65bba042
...@@ -1075,7 +1075,7 @@ include/config/kernel.release: $(srctree)/Makefile FORCE ...@@ -1075,7 +1075,7 @@ include/config/kernel.release: $(srctree)/Makefile FORCE
# Carefully list dependencies so we do not try to build scripts twice # Carefully list dependencies so we do not try to build scripts twice
# in parallel # in parallel
PHONY += scripts PHONY += scripts
scripts: scripts_basic scripts_dtc asm-generic gcc-plugins $(autoksyms_h) scripts: scripts_basic scripts_dtc
$(Q)$(MAKE) $(build)=$(@) $(Q)$(MAKE) $(build)=$(@)
# Things we need to do before we recursively start building the kernel # Things we need to do before we recursively start building the kernel
...@@ -1113,6 +1113,7 @@ macroprepare: prepare1 archmacros ...@@ -1113,6 +1113,7 @@ macroprepare: prepare1 archmacros
archprepare: archheaders archscripts macroprepare scripts_basic gcc-plugins archprepare: archheaders archscripts macroprepare scripts_basic gcc-plugins
prepare0: archprepare prepare0: archprepare
$(Q)$(MAKE) $(build)=scripts/mod
$(Q)$(MAKE) $(build)=. $(Q)$(MAKE) $(build)=.
# All the preparing.. # All the preparing..
......
...@@ -37,9 +37,8 @@ build_unifdef: $(obj)/unifdef ...@@ -37,9 +37,8 @@ build_unifdef: $(obj)/unifdef
@: @:
subdir-$(CONFIG_MODVERSIONS) += genksyms subdir-$(CONFIG_MODVERSIONS) += genksyms
subdir-y += mod
subdir-$(CONFIG_SECURITY_SELINUX) += selinux subdir-$(CONFIG_SECURITY_SELINUX) += selinux
subdir-$(CONFIG_GDB_SCRIPTS) += gdb subdir-$(CONFIG_GDB_SCRIPTS) += gdb
# Let clean descend into subdirs # Let clean descend into subdirs
subdir- += basic dtc kconfig package gcc-plugins subdir- += basic dtc kconfig mod package gcc-plugins
...@@ -4,8 +4,6 @@ OBJECT_FILES_NON_STANDARD := y ...@@ -4,8 +4,6 @@ OBJECT_FILES_NON_STANDARD := y
hostprogs-y := modpost mk_elfconfig hostprogs-y := modpost mk_elfconfig
always := $(hostprogs-y) empty.o always := $(hostprogs-y) empty.o
CFLAGS_REMOVE_empty.o := $(ASM_MACRO_FLAGS)
modpost-objs := modpost.o file2alias.o sumversion.o modpost-objs := modpost.o file2alias.o sumversion.o
devicetable-offsets-file := devicetable-offsets.h devicetable-offsets-file := devicetable-offsets.h
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment