public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <natechancellor@gmail.com>
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, "Theodore Y. Ts'o" <tytso@mit.edu>,
	Mike Lothian <mike@fireburn.co.uk>
Subject: Re: [PATCH v2] kbuild: Fail if gold linker is detected
Date: Tue, 16 Jul 2019 12:59:57 -0700	[thread overview]
Message-ID: <20190716195957.GA38495@archlinux-threadripper> (raw)
In-Reply-To: <alpine.DEB.2.21.1907162135590.1767@nanos.tec.linutronix.de>

On Tue, Jul 16, 2019 at 09:47:27PM +0200, Thomas Gleixner wrote:
> The gold linker has known issues of failing the build both in random and in
> predictible ways:
> 
>  - The x86/X32 VDSO build fails with:
> 
>    arch/x86/entry/vdso/vclock_gettime-x32.o:vclock_gettime.c:function do_hres:
>    error: relocation overflow: reference to 'hvclock_page'
> 
>    That's a known issue for years and the usual workaround is to disable
>    CONFIG_X86_32
> 
>  - A recent build failure is caused by turning a relocation into an
>    absolute one for unknown reasons. See link below.
> 
>  - There are a couple of gold workarounds applied already, but reports
>    about broken builds with ld.gold keep coming in on a regular base and in
>    most cases the root cause is unclear.
> 
> In context of the most recent fail 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 and without support from the gold folks, fail
> the build when gold is detected.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> Link: https://lore.kernel.org/r/CAMe9rOqMqkQ0LNpm25yE_Yt0FKp05WmHOrwc0aRDb53miFKM+w@mail.gmail.com

Based on the crude little testing script I wrote below:

Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>

$ cat test.sh
#!/bin/bash

# ld.bfd (expected to pass)
make distclean defconfig || exit ${?}

# ld.gold explicitly (expected to fail)
make LD=ld.gold distclean defconfig && exit ${?}

# ld.gold as if it were the system linker (expected to fail)
ln -fs /usr/bin/ld.gold ld
PATH=${PWD}:${PATH} make distclean defconfig && exit ${?}

# ld.lld (expected to pass)
make LD=ld.lld distclean defconfig || exit ${?}

  reply	other threads:[~2019-07-16 20:00 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
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 [this message]
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=20190716195957.GA38495@archlinux-threadripper \
    --to=natechancellor@gmail.com \
    --cc=hjl.tools@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike@fireburn.co.uk \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    --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