[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7c6b114a-38f8-1a0b-8623-d492f9cc2fb9@physik.fu-berlin.de>
Date: Sat, 21 Jan 2023 22:26:42 +0100
From: John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>
To: Michael Karcher <kernel@...rcher.dialup.fu-berlin.de>,
Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: linux-kernel@...r.kernel.org, amd-gfx@...ts.freedesktop.org,
linux-arm-kernel@...ts.infradead.org, linux-media@...r.kernel.org,
linux-mips@...r.kernel.org, linux-wireless@...r.kernel.org,
linux-sh@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net,
linuxppc-dev@...ts.ozlabs.org, kasan-dev@...glegroups.com,
linux-xtensa@...ux-xtensa.org, Arnd Bergmann <arnd@...db.de>
Subject: Re: Calculating array sizes in C - was: Re: Build
regressions/improvements in v6.2-rc1
Hi!
On 1/20/23 20:29, Michael Karcher wrote:
> Hello Adrian,
>> Could you post a kernel patch for that? I would be happy to test it on my
>> SH-7785CLR board. Also, I'm going to file a bug report against GCC.
>
> I filed the bug already. It's https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108483.
>
> The diff is attached. It's published as CC0 in case anyone considers this trivial change copyrightable. This patch prevents this one specific warning from being upgraded to "error" even if you configure the kernel to use "-Werror". It still keeps it active as warning, though.
I used the following variant and it fixes the issue for me:
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index 5c8776482530..11b22f7167d2 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -167,7 +167,7 @@ drivers-y += arch/sh/drivers/
cflags-y += $(foreach d, $(cpuincdir-y), -I $(srctree)/arch/sh/include/$(d)) \
$(foreach d, $(machdir-y), -I $(srctree)/arch/sh/include/$(d))
-KBUILD_CFLAGS += -pipe $(cflags-y)
+KBUILD_CFLAGS += -pipe -Wno-error=sizeof-pointer-div $(cflags-y)
KBUILD_CPPFLAGS += $(cflags-y)
KBUILD_AFLAGS += $(cflags-y)
If you agree, can you post a patch to LKML so we can unbreak the SH build for CONFIG_WERROR?
Thanks,
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Powered by blists - more mailing lists