From bda9d9ac43042d28f4c1242f3d2354bdc316b042 Mon Sep 17 00:00:00 2001 From: Jamie Iles Date: Fri, 16 Aug 2013 17:02:25 +0100 Subject: [PATCH] kbuild/ctf: always build vmlinux when building CTF. Before now, a 'make modules' in a clean tree would neglect to build the built-in objects and yield an empty objects.builtin, or no objects.builtin at all. Correct generation of the CTF requires all the .o and .a files which go into vmlinux, and a list of them in objects.builtin: without them, dwarf2ctf will fail one way or the other. While we're at it, remove all CTF-related references in the build system to CONFIG_DTRACE and CONFIG_DT_DISABLE_CTF: CTF generation has been decoupled from DTrace and has its own config symbol nowadays. Orabug: 17397200 Signed-off-by: Jamie Iles Signed-off-by: Nick Alcock --- Makefile | 11 +++++------ scripts/Makefile.modpost | 9 --------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index af7123949492..468d99cca309 100644 --- a/Makefile +++ b/Makefile @@ -1102,8 +1102,11 @@ modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin objects $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild -ifdef CONFIG_DTRACE -ifndef CONFIG_DT_DISABLE_CTF +ifdef CONFIG_CTF + +# We need to force everything to be built, since we need the .o files below. +KBUILD_BUILTIN := 1 + # This contains all the object files that are unconditionally built into the # kernel, for consumption by dwarf2ctf in Makefile.modpost. # This is made doubly annoying by the presence of '.o' files which are actually @@ -1121,10 +1124,6 @@ else PHONY += objects.builtin objects.builtin: endif -else -PHONY += objects.builtin -objects.builtin: -endif # Target to prepare building external modules PHONY += modules_prepare diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 3bb4ca9c7e75..5e4dcc197c6e 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -123,7 +123,6 @@ targets += $(modules:.ko=.mod.o) # is a build of an external module. ifdef CONFIG_CTF -ifndef CONFIG_DT_DISABLE_CTF # This is quite tricky. If called for non-external-modules, dwarf2ctf needs to # be told about all the built-in objects as well as all the external modules -- @@ -230,14 +229,6 @@ cmd_touch_ctf = @for name in $(filter $(ctf-dir)/%,$(module-ctfs-modular)); do \ test -f $$name || dd if=/dev/zero of=$$name bs=1 count=1 2>/dev/null; \ done -else # CONFIG_DT_DISABLE_CTF - -module-ctfs-modular-prereq = -module-ctfs-builtin = -module-ctf-flags = -cmd-touch-ctf = @: - -endif else # !CONFIG_CTF module-ctfs-modular-prereq = -- 2.50.1