From e19bda36fa4ec9a75ee517ad1df8278c23309f22 Mon Sep 17 00:00:00 2001 From: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com> Date: Fri, 11 Apr 2025 03:31:25 +0800 Subject: [PATCH] Tweak the kernel Makefile to fix the compilation flag order and ensure that KPM targets are handled correctly --- kernel/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kernel/Makefile b/kernel/Makefile index 9970b07c..05199dbe 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -11,15 +11,17 @@ kernelsu-objs += kernel_compat.o kernelsu-objs += selinux/selinux.o kernelsu-objs += selinux/sepolicy.o kernelsu-objs += selinux/rules.o -ccflags-y += -Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-int-conversion -ccflags-y += -Wno-declaration-after-statement -Wno-unused-function + ccflags-y += -I$(srctree)/security/selinux -I$(srctree)/security/selinux/include ccflags-y += -I$(objtree)/security/selinux -include $(srctree)/include/uapi/asm-generic/errno.h -obj-$(CONFIG_KPM) += kpm/ +ccflags-y += -Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-int-conversion +ccflags-y += -Wno-declaration-after-statement -Wno-unused-function obj-$(CONFIG_KSU) += kernelsu.o +obj-$(CONFIG_KPM) += kpm/ + # Do checks before compile ifneq ($(shell grep -q "int path_umount" $(srctree)/fs/namespace.c; echo $$?),0) $(error -- Backporting path_umount is mandatory !! Read: https://kernelsu.org/guide/how-to-integrate-for-non-gki.html#how-to-backport-path-umount)