public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* kbuild: Fail if gold linker is detected
@ 2019-07-16 12:47 Thomas Gleixner
  2019-07-16 12:54 ` Peter Zijlstra
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Thomas Gleixner @ 2019-07-16 12:47 UTC (permalink / raw)
  To: LKML; +Cc: Linus Torvalds, x86, H.J. Lu, Masahiro Yamada, linux-kbuild

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>
Link: https://lore.kernel.org/r/CAMe9rOqMqkQ0LNpm25yE_Yt0FKp05WmHOrwc0aRDb53miFKM+w@mail.gmail.com
---
 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))

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2019-07-29 17:18 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox