Message ID | 20200910135120.3527468-4-masahiroy@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/4] kbuild: remove cc-option test of -fno-strict-overflow | expand |
On Thu, Sep 10, 2020 at 10:51:20PM +0900, Masahiro Yamada wrote: > The minimal compiler versions, GCC 4.9 and Clang 10 support this flag. > > Here is the godbolt: > https://godbolt.org/z/xvjcMa > > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Introduced in clang 3.5.0, see commit 4f43e554081ecac149fe360bee6eef2ed7dab8ea in LLVM. Reviewed-by: Nathan Chancellor <natechancellor@gmail.com> > --- > > Makefile | 2 +- > arch/arm64/kernel/vdso32/Makefile | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/Makefile b/Makefile > index 5102c89d3167..1d7c58684fda 100644 > --- a/Makefile > +++ b/Makefile > @@ -940,7 +940,7 @@ KBUILD_CFLAGS += -fno-stack-check > KBUILD_CFLAGS += $(call cc-option,-fconserve-stack) > > # Prohibit date/time macros, which would make the build non-deterministic > -KBUILD_CFLAGS += $(call cc-option,-Werror=date-time) > +KBUILD_CFLAGS += -Werror=date-time > > # enforce correct pointer usage > KBUILD_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types) > diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile > index dfffd55175a3..1feb4f8e556e 100644 > --- a/arch/arm64/kernel/vdso32/Makefile > +++ b/arch/arm64/kernel/vdso32/Makefile > @@ -92,7 +92,7 @@ VDSO_CFLAGS += $(call cc32-option,-Wdeclaration-after-statement,) > VDSO_CFLAGS += $(call cc32-option,-Wno-pointer-sign) > VDSO_CFLAGS += -fno-strict-overflow > VDSO_CFLAGS += $(call cc32-option,-Werror=strict-prototypes) > -VDSO_CFLAGS += $(call cc32-option,-Werror=date-time) > +VDSO_CFLAGS += -Werror=date-time > VDSO_CFLAGS += $(call cc32-option,-Werror=incompatible-pointer-types) > > # The 32-bit compiler does not provide 128-bit integers, which are used in > -- > 2.25.1 >
diff --git a/Makefile b/Makefile index 5102c89d3167..1d7c58684fda 100644 --- a/Makefile +++ b/Makefile @@ -940,7 +940,7 @@ KBUILD_CFLAGS += -fno-stack-check KBUILD_CFLAGS += $(call cc-option,-fconserve-stack) # Prohibit date/time macros, which would make the build non-deterministic -KBUILD_CFLAGS += $(call cc-option,-Werror=date-time) +KBUILD_CFLAGS += -Werror=date-time # enforce correct pointer usage KBUILD_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types) diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile index dfffd55175a3..1feb4f8e556e 100644 --- a/arch/arm64/kernel/vdso32/Makefile +++ b/arch/arm64/kernel/vdso32/Makefile @@ -92,7 +92,7 @@ VDSO_CFLAGS += $(call cc32-option,-Wdeclaration-after-statement,) VDSO_CFLAGS += $(call cc32-option,-Wno-pointer-sign) VDSO_CFLAGS += -fno-strict-overflow VDSO_CFLAGS += $(call cc32-option,-Werror=strict-prototypes) -VDSO_CFLAGS += $(call cc32-option,-Werror=date-time) +VDSO_CFLAGS += -Werror=date-time VDSO_CFLAGS += $(call cc32-option,-Werror=incompatible-pointer-types) # The 32-bit compiler does not provide 128-bit integers, which are used in
The minimal compiler versions, GCC 4.9 and Clang 10 support this flag. Here is the godbolt: https://godbolt.org/z/xvjcMa Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> --- Makefile | 2 +- arch/arm64/kernel/vdso32/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)