All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Tor Vic <torvic9@mailbox.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	masahiroy@kernel.org,
	"ndesaulniers@google.com" <ndesaulniers@google.com>,
	keescook@chromium.org
Cc: "clang-built-linux@googlegroups.com" 
	<clang-built-linux@googlegroups.com>,
	linux-kbuild@vger.kernel.org
Subject: Re: [PATCH 1/1] Makefile: Pass -warn-stack-size only on LLD < 13.0.0
Date: Mon, 14 Jun 2021 13:51:32 -0700	[thread overview]
Message-ID: <51c33b62-1e91-7c69-5b77-75ffe0ad6e77@kernel.org> (raw)
In-Reply-To: <7631bab7-a8ab-f884-ab54-f4198976125c@mailbox.org>

On 6/13/2021 6:07 AM, 'Tor Vic' via Clang Built Linux wrote:
> Since LLVM commit fc018eb, the '-warn-stack-size' flag has been dropped
> [1], leading to the following error message when building with Clang-13
> and LLD-13:
> 
>      ld.lld: error: -plugin-opt=-: ld.lld: Unknown command line argument
>      '-warn-stack-size=2048'.  Try: 'ld.lld --help'
>      ld.lld: Did you mean '--asan-stack=2048'?
> 
> In the same way as with commit 2398ce80152a ("x86, lto: Pass
> -stack-alignment only on LLD < 13.0.0") , make '-warn-stack-size'
> conditional on LLD < 13.0.0.
> 
> [1] https://reviews.llvm.org/D103928
> 
> Fixes: 24845dcb170e ("Makefile: LTO: have linker check -Wframe-larger-than")
> Cc: stable@vger.kernel.org
> Link: https://github.com/ClangBuiltLinux/linux/issues/1377
> Signed-off-by: Tor Vic <torvic9@mailbox.org>

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

The commit that this fixes went into 5.13-rc4 and our CI builds are 
currently failing without this so it would be nice if it could go into 
5.13 but I understand it is getting late in the cycle and there has 
already been a fixes pull request with a similar fix.

Cheers,
Nathan

> ---
>   Makefile | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 144d4f8b7eb3..51a1b6b2c2ab 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -929,11 +929,14 @@ CC_FLAGS_LTO	+= -fvisibility=hidden
>   # Limit inlining across translation units to reduce binary size
>   KBUILD_LDFLAGS += -mllvm -import-instr-limit=5
> 
> -# Check for frame size exceeding threshold during prolog/epilog insertion.
> +# Check for frame size exceeding threshold during prolog/epilog insertion
> +# when using lld < 13.0.0.
>   ifneq ($(CONFIG_FRAME_WARN),0)
> +ifeq ($(shell test $(CONFIG_LLD_VERSION) -lt 130000; echo $$?),0)
>   KBUILD_LDFLAGS	+= -plugin-opt=-warn-stack-size=$(CONFIG_FRAME_WARN)
>   endif
>   endif
> +endif
> 
>   ifdef CONFIG_LTO
>   KBUILD_CFLAGS	+= -fno-lto $(CC_FLAGS_LTO)
> 


  reply	other threads:[~2021-06-14 20:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-13 13:07 [PATCH 1/1] Makefile: Pass -warn-stack-size only on LLD < 13.0.0 Tor Vic
2021-06-14 20:51 ` Nathan Chancellor [this message]
2021-06-14 20:54 ` Nick Desaulniers
2021-06-14 21:49 ` Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51c33b62-1e91-7c69-5b77-75ffe0ad6e77@kernel.org \
    --to=nathan@kernel.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=keescook@chromium.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=torvic9@mailbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.