From: Greg Kroah-Hartman Date: Sun, 16 Jul 2023 18:00:44 +0000 (+0200) Subject: 6.4-stable patches X-Git-Tag: v6.1.39~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8ae2dda6e464624a2cbfba9fe6e9f0d16c0fd049;p=thirdparty%2Fkernel%2Fstable-queue.git 6.4-stable patches added patches: loongarch-include-kbuild_cppflags-in-checkflags-invocation.patch --- diff --git a/queue-6.4/loongarch-include-kbuild_cppflags-in-checkflags-invocation.patch b/queue-6.4/loongarch-include-kbuild_cppflags-in-checkflags-invocation.patch new file mode 100644 index 00000000000..a839fdbe583 --- /dev/null +++ b/queue-6.4/loongarch-include-kbuild_cppflags-in-checkflags-invocation.patch @@ -0,0 +1,36 @@ +From 5ddc7a3794ddd3470635ebd325fa1dffea5b18c0 Mon Sep 17 00:00:00 2001 +From: WANG Xuerui +Date: Thu, 29 Jun 2023 20:58:43 +0800 +Subject: LoongArch: Include KBUILD_CPPFLAGS in CHECKFLAGS invocation + +From: WANG Xuerui + +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 +Reviewed-by: Nathan Chancellor +Link: https://github.com/ClangBuiltLinux/linux/issues/1787#issuecomment-1608306002 +Signed-off-by: WANG Xuerui +Signed-off-by: Huacai Chen +Signed-off-by: Greg Kroah-Hartman +--- + 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 diff --git a/queue-6.4/series b/queue-6.4/series index 42b7eb95eb1..e2e46d31bcd 100644 --- a/queue-6.4/series +++ b/queue-6.4/series @@ -784,3 +784,4 @@ kbuild-add-clang_flags-to-kbuild_cppflags.patch ovl-fix-null-pointer-dereference-in-ovl_permission.patch ovl-let-helper-ovl_i_path_real-return-the-realinode.patch ovl-fix-null-pointer-dereference-in-ovl_get_acl_rcu.patch +loongarch-include-kbuild_cppflags-in-checkflags-invocation.patch