linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] kbuild: remove cc-option test of -fno-strict-overflow
@ 2020-09-10 13:51 Masahiro Yamada
  2020-09-10 13:51 ` [PATCH 4/4] kbuild: remove cc-option test of -Werror=date-time Masahiro Yamada
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Masahiro Yamada @ 2020-09-10 13:51 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Michal Marek, Catalin Marinas, Masahiro Yamada, Nick Desaulniers,
	linux-kernel, Stephen Boyd, clang-built-linux, Ingo Molnar,
	Nathan Chancellor, Vincenzo Frascino, Will Deacon,
	linux-arm-kernel

The minimal compiler versions, GCC 4.9 and Clang 10 support this flag.

Here is the godbolt:
https://godbolt.org/z/odq8h9

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 Makefile                          | 2 +-
 arch/arm64/kernel/vdso32/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 4b5a305e30d2..059b36f2ea53 100644
--- a/Makefile
+++ b/Makefile
@@ -922,7 +922,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning, restrict)
 KBUILD_CFLAGS += $(call cc-disable-warning, maybe-uninitialized)
 
 # disable invalid "can't wrap" optimizations for signed / pointers
-KBUILD_CFLAGS	+= $(call cc-option,-fno-strict-overflow)
+KBUILD_CFLAGS	+= -fno-strict-overflow
 
 # clang sets -fmerge-all-constants by default as optimization, but this
 # is non-conforming behavior for C and in fact breaks the kernel, so we
diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
index d6adb4677c25..dfffd55175a3 100644
--- a/arch/arm64/kernel/vdso32/Makefile
+++ b/arch/arm64/kernel/vdso32/Makefile
@@ -90,7 +90,7 @@ VDSO_CFLAGS  += -O2
 # Some useful compiler-dependent flags from top-level Makefile
 VDSO_CFLAGS += $(call cc32-option,-Wdeclaration-after-statement,)
 VDSO_CFLAGS += $(call cc32-option,-Wno-pointer-sign)
-VDSO_CFLAGS += $(call cc32-option,-fno-strict-overflow)
+VDSO_CFLAGS += -fno-strict-overflow
 VDSO_CFLAGS += $(call cc32-option,-Werror=strict-prototypes)
 VDSO_CFLAGS += $(call cc32-option,-Werror=date-time)
 VDSO_CFLAGS += $(call cc32-option,-Werror=incompatible-pointer-types)
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-09-14 13:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-10 13:51 [PATCH 1/4] kbuild: remove cc-option test of -fno-strict-overflow Masahiro Yamada
2020-09-10 13:51 ` [PATCH 4/4] kbuild: remove cc-option test of -Werror=date-time Masahiro Yamada
2020-09-10 16:43   ` Nathan Chancellor
2020-09-10 16:26 ` [PATCH 1/4] kbuild: remove cc-option test of -fno-strict-overflow Nathan Chancellor
2020-09-11 15:22 ` Will Deacon
2020-09-14 12:51   ` Masahiro Yamada
2020-09-14 13:20     ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).