[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+icZUXzSGAAZ=fs1rTwDUT5aqEzMSsDdTr2V+fO0s4FGOmAAg@mail.gmail.com>
Date: Tue, 1 Sep 2020 19:36:23 +0200
From: Sedat Dilek <sedat.dilek@...il.com>
To: Nick Desaulniers <ndesaulniers@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Kees Cook <keescook@...omium.org>,
Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
Nathan Chancellor <natechancellor@...il.com>,
Marco Elver <elver@...gle.com>,
Andrey Konovalov <andreyknvl@...gle.com>,
Masahiro Yamada <masahiroy@...nel.org>,
Clang-Built-Linux ML <clang-built-linux@...glegroups.com>,
Daniel Borkmann <daniel@...earbox.net>,
Alexei Starovoitov <ast@...nel.org>,
Will Deacon <will@...nel.org>,
Vincenzo Frascino <vincenzo.frascino@....com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/7] Revert "kbuild: disable clang's default use of -fmerge-all-constants"
On Tue, Sep 1, 2020 at 2:23 AM Nick Desaulniers <ndesaulniers@...gle.com> wrote:
>
> This reverts commit 87e0d4f0f37fb0c8c4aeeac46fff5e957738df79.
>
> This was fixed in clang-6; the minimum supported version of clang in the
> kernel is clang-10 (10.0.1).
>
> Link: https://reviews.llvm.org/rL329300.
> Link: https://github.com/ClangBuiltLinux/linux/issues/9
> Suggested-by: Nathan Chancellor <natechancellor@...il.com>
> Signed-off-by: Nick Desaulniers <ndesaulniers@...gle.com>
Reviewed-by: Sedat Dilek <sedat.dilek@...il.com>
Tested-by: Sedat Dilek <sedat.dilek@...il.com>
- Sedat -
> ---
> Makefile | 9 ---------
> 1 file changed, 9 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 37739ee53f27..144ac6a073ff 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -932,15 +932,6 @@ 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)
>
> -# 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
> -# need to disable it here generally.
> -KBUILD_CFLAGS += $(call cc-option,-fno-merge-all-constants)
> -
> -# for gcc -fno-merge-all-constants disables everything, but it is fine
> -# to have actual conforming behavior enabled.
> -KBUILD_CFLAGS += $(call cc-option,-fmerge-constants)
> -
> # Make sure -fstack-check isn't enabled (like gentoo apparently did)
> KBUILD_CFLAGS += $(call cc-option,-fno-stack-check,)
>
> --
> 2.28.0.402.g5ffc5be6b7-goog
>
Powered by blists - more mailing lists