Commit 951e77cc authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: Silence some warnings when building vmlinux

For some people (though not me), the '+' indicating that a command will
invoke a sub-make didn't propagated properly, and caused a warning.
Putting the command all into one line should fix that.

Plus some cosmetics and clean up the per_cpu check.
parent 2020d74b
......@@ -319,36 +319,31 @@ define cmd_vmlinux__
endef
# set -e makes the rule exit immediately on error
# Final awk script makes sure per-cpu vars are in per-cpu section, as
# old gcc (eg egcs 2.92.11) ignores section attribute if uninitialized.
define rule_vmlinux__
set -e
$(if $(filter .tmp_kallsyms%,$^),,
echo ' Generating build number'
. $(src)/scripts/mkversion > .tmp_version
mv -f .tmp_version .version
$(Q)$(MAKE) $(build)=init
set -e; \
$(if $(filter .tmp_kallsyms%,$^),, \
echo ' GEN .version'; \
. $(src)/scripts/mkversion > .tmp_version; \
mv -f .tmp_version .version; \
$(MAKE) $(build)=init; \
)
$(call cmd,vmlinux__)
$(call cmd,vmlinux__); \
echo 'cmd_$@ := $(cmd_vmlinux__)' > $(@D)/.$(@F).cmd
endef
define rule_vmlinux_no_percpu
$(rule_vmlinux__)
$(NM) $@ | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
endef
ifdef CONFIG_SMP
# Final awk script makes sure per-cpu vars are in per-cpu section, as
# old gcc (eg egcs 2.92.11) ignores section attribute if uninitialized.
check_per_cpu = $(AWK) -f $(srctree)/scripts/per-cpu-check.awk < System.map
endif
define rule_vmlinux
$(rule_vmlinux_no_percpu)
$(AWK) -f $(srctree)/scripts/per-cpu-check.awk < System.map
endef
else
define rule_vmlinux
$(rule_vmlinux_no_percpu)
$(rule_vmlinux__)
$(NM) $@ | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
$(check_per_cpu)
endef
endif
LDFLAGS_vmlinux += -T arch/$(ARCH)/vmlinux.lds.s
......
......@@ -17,5 +17,5 @@ $(obj)/version.o: include/linux/compile.h
# actual file if its content has changed.
include/linux/compile.h: FORCE
@echo -n ' Generating $@'
@echo -n ' GEN $@'
@sh $(srctree)/scripts/mkcompile_h $@ "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CC) $(CFLAGS)"
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