Skip to content

Commit 8b42cf2

Browse files
committed
kbuild: remove cc-option test of -fno-strict-overflow
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 <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Acked-by: Will Deacon <[email protected]>
1 parent bb27321 commit 8b42cf2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning, restrict)
928928
KBUILD_CFLAGS += $(call cc-disable-warning, maybe-uninitialized)
929929

930930
# disable invalid "can't wrap" optimizations for signed / pointers
931-
KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow)
931+
KBUILD_CFLAGS += -fno-strict-overflow
932932

933933
# clang sets -fmerge-all-constants by default as optimization, but this
934934
# is non-conforming behavior for C and in fact breaks the kernel, so we

arch/arm64/kernel/vdso32/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ VDSO_CFLAGS += -O2
9090
# Some useful compiler-dependent flags from top-level Makefile
9191
VDSO_CFLAGS += $(call cc32-option,-Wdeclaration-after-statement,)
9292
VDSO_CFLAGS += $(call cc32-option,-Wno-pointer-sign)
93-
VDSO_CFLAGS += $(call cc32-option,-fno-strict-overflow)
93+
VDSO_CFLAGS += -fno-strict-overflow
9494
VDSO_CFLAGS += $(call cc32-option,-Werror=strict-prototypes)
9595
VDSO_CFLAGS += $(call cc32-option,-Werror=date-time)
9696
VDSO_CFLAGS += $(call cc32-option,-Werror=incompatible-pointer-types)

0 commit comments

Comments
 (0)