From: Peter Zijlstra <peterz@infradead.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
x86@kernel.org, "H.J. Lu" <hjl.tools@gmail.com>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
linux-kbuild@vger.kernel.org
Subject: Re: kbuild: Fail if gold linker is detected
Date: Tue, 16 Jul 2019 14:54:47 +0200 [thread overview]
Message-ID: <20190716125447.GZ3402@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <alpine.DEB.2.21.1907161434260.1767@nanos.tec.linutronix.de>
On Tue, Jul 16, 2019 at 02:47:56PM +0200, Thomas Gleixner wrote:
> The gold linker has known issues of failing the build in random and
> predictible ways. H.J. stated:
>
> "Since building a workable kernel for different kernel configurations
> isn't a requirement for gold, I don't recommend gold for kernel."
>
> So instead of dealing with attempts to duct tape gold support without
> understanding the root cause, fail the build when gold is detected.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Right, life is too short to fight toolchains that aren't interested in
working.
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
> scripts/Kconfig.include | 3 +++
> 1 file changed, 3 insertions(+)
>
> --- a/scripts/Kconfig.include
> +++ b/scripts/Kconfig.include
> @@ -35,5 +35,8 @@ ld-option = $(success,$(LD) -v $(1))
> $(error-if,$(failure,command -v $(CC)),compiler '$(CC)' not found)
> $(error-if,$(failure,command -v $(LD)),linker '$(LD)' not found)
>
> +# Fail if the linker is gold as it's not capable of linking the kernel proper
> +$(error-if,$(success, command -v $(LD) -v | grep -q gold), gold linker '$(LD)' not supported)
> +
> # gcc version including patch level
> gcc-version := $(shell,$(srctree)/scripts/gcc-version.sh $(CC))
next prev parent reply other threads:[~2019-07-16 12:54 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-16 12:47 kbuild: Fail if gold linker is detected Thomas Gleixner
2019-07-16 12:54 ` Peter Zijlstra [this message]
2019-07-16 14:40 ` Ingo Molnar
2019-07-16 15:59 ` Thomas Gleixner
2019-07-16 18:13 ` Ingo Molnar
2019-07-16 18:46 ` Linus Torvalds
2019-07-16 18:52 ` Theodore Y. Ts'o
2019-07-29 17:06 ` Bernd Petrovitsch
2019-07-16 17:06 ` Nathan Chancellor
2019-07-16 18:59 ` Thomas Gleixner
2019-07-16 19:47 ` [PATCH v2] " Thomas Gleixner
2019-07-16 19:59 ` Nathan Chancellor
2019-07-16 21:20 ` Mike Lothian
2019-07-16 22:25 ` Thomas Gleixner
2019-07-16 23:37 ` Theodore Y. Ts'o
2019-07-17 6:54 ` Masahiro Yamada
2019-07-17 7:57 ` Thomas Gleixner
2019-07-20 9:12 ` Mike Lothian
2019-07-20 9:34 ` Thomas Gleixner
2019-07-20 10:13 ` Mike Lothian
2019-07-20 10:54 ` Thomas Gleixner
2019-07-20 10:59 ` Mike Lothian
2019-07-23 1:30 ` Masahiro Yamada
2019-07-23 6:41 ` Thomas Gleixner
2019-07-23 8:17 ` Thomas Gleixner
2019-07-29 2:27 ` Masahiro Yamada
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=20190716125447.GZ3402@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=hjl.tools@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
--cc=yamada.masahiro@socionext.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox