This is a note to let you know that I've just added the patch titled LoongArch: Include KBUILD_CPPFLAGS in CHECKFLAGS invocation to the 6.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: loongarch-include-kbuild_cppflags-in-checkflags-invocation.patch and it can be found in the queue-6.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 5ddc7a3794ddd3470635ebd325fa1dffea5b18c0 Mon Sep 17 00:00:00 2001 From: WANG Xuerui <git@xxxxxxxxxx> Date: Thu, 29 Jun 2023 20:58:43 +0800 Subject: LoongArch: Include KBUILD_CPPFLAGS in CHECKFLAGS invocation From: WANG Xuerui <git@xxxxxxxxxx> commit 5ddc7a3794ddd3470635ebd325fa1dffea5b18c0 upstream. This is a port of commit 08f6554ff90e ("mips: Include KBUILD_CPPFLAGS in CHECKFLAGS invocation") to arch/loongarch, for fixing cross-compilation of Linux/LoongArch with Clang, where previously the `--target` flag would no longer be present for the CHECKFLAGS cc invocation leading to build failure. Reported-by: Nathan Chancellor <nathan@xxxxxxxxxx> Reviewed-by: Nathan Chancellor <nathan@xxxxxxxxxx> Link: https://github.com/ClangBuiltLinux/linux/issues/1787#issuecomment-1608306002 Signed-off-by: WANG Xuerui <git@xxxxxxxxxx> Signed-off-by: Huacai Chen <chenhuacai@xxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/loongarch/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/loongarch/Makefile +++ b/arch/loongarch/Makefile @@ -107,7 +107,7 @@ KBUILD_CFLAGS += -isystem $(shell $(CC) KBUILD_LDFLAGS += -m $(ld-emul) ifdef CONFIG_LOONGARCH -CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \ +CHECKFLAGS += $(shell $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \ grep -E -vw '__GNUC_(MINOR_|PATCHLEVEL_)?_' | \ sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/" -e 's/\$$/&&/g') endif Patches currently in stable-queue which might be from git@xxxxxxxxxx are queue-6.4/loongarch-include-kbuild_cppflags-in-checkflags-invocation.patch