From c0b2c6b06b6a05c5fd3ec4dd41d98ca4409561a1 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Mon, 27 Jan 2025 16:48:32 +0000 Subject: [PATCH] Fix: powerpc builds with linux v6.13 The crtsavres.o object for powerpc is missing the $(objtree) prefix. This can be worked-around by setting MO=$KERNELDIR and building in the kernel tree as before this version. See upstream commit: commit 214c0eea43b2ea66bcd6467ea57e47ce8874191b Author: Masahiro Yamada Date: Sun Nov 10 10:34:30 2024 +0900 kbuild: add $(objtree)/ prefix to some in-kernel build artifacts $(objtree) refers to the top of the output directory of kernel builds. This commit adds the explicit $(objtree)/ prefix to build artifacts needed for building external modules. This change has no immediate impact, as the top-level Makefile currently defines: objtree := . This commit prepares for supporting the building of external modules in a different directory. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Change-Id: I11f7ee1e7e5634e992953798e9ecef6b2558ff79 Signed-off-by: Kienan Stewart Signed-off-by: Mathieu Desnoyers --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 81bdedac..a3235da1 100644 --- a/Makefile +++ b/Makefile @@ -25,12 +25,18 @@ ifeq ($(CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM),y) LKCPPFLAGS += -DCONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM=y endif +# Work-around for crtsavres.o missing $(objtree) prefix on powerpc +ifeq ($(ARCH),powerpc) +MO ?= $(KERNELDIR) +MO_OPT = MO=$(MO) +endif + default: modules modules: $(MAKE) -C $(KERNELDIR) M=$(PWD)/src \ CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m \ - KCPPFLAGS='$(LKCPPFLAGS)' \ + KCPPFLAGS='$(LKCPPFLAGS)' $(MO_OPT) \ modules modules_install: -- 2.39.5