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>
$(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
PHONY += objects.builtin
objects.builtin:
endif
-else
-PHONY += objects.builtin
-objects.builtin:
-endif
# Target to prepare building external modules
PHONY += modules_prepare
# 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 --
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 =