]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
kbuild/ctf: always build vmlinux when building CTF.
authorJamie Iles <jamie.iles@oracle.com>
Fri, 16 Aug 2013 16:02:25 +0000 (17:02 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Tue, 21 Jul 2015 14:29:17 +0000 (15:29 +0100)
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 <jamie.iles@oracle.com>
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Makefile
scripts/Makefile.modpost

index af71239494924d40827590ab54a4e5fa3a77e108..468d99cca309113291b7ab33263dfde0574f3036 100644 (file)
--- 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
index 3bb4ca9c7e75d8f7f306d12f97abc309e0deea10..5e4dcc197c6e68bb3614d51b4460ff0e37b6f754 100644 (file)
@@ -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 =