Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp823059ybi; Tue, 16 Jul 2019 05:49:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqyoVf7Y3+HURGqbAmrvz6Uayrxhuoh1xsY7lK6VZxGVByffrjE606CsXqJ+CegcGf6LczNk X-Received: by 2002:a17:902:788f:: with SMTP id q15mr35812095pll.236.1563281381139; Tue, 16 Jul 2019 05:49:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563281381; cv=none; d=google.com; s=arc-20160816; b=fCTi+B2aWNrtBs2+Cp54JDOaGTHysv9DpFs8zS1fb4mJUjqiLhk5HYrTmb7I+Slx+K Ge33HeqzSUIanwCYtF6necWV8jH6zJRSWmALRsOqoUohb/Omle22ELNlxm3+MuB28qRH bQ148Ihlqo622lAPtDrBmdgwFJr69QZGpf6wkSUsdb9EFwwWKlSQK4/WDPcuhMXB3Rjb 8l0gD7UB1rmGshiyPEBfykps02HycUkP9GGV95iMNCK+lQYn8+JklYcFTAFMMiuPpu+U vltTfTt3lrLd02zhm00rzj67Mu/TqQzLhF4+AnHlVuMZqwUOiH1iYOqBaX51/oIKoACk CEMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :subject:cc:to:from:date; bh=jyrq+S4dQ5fVe+EE+2ukglrqc8kXwZoG+u3WsN8jNME=; b=NrU4hKFo7eFKmXwd7ZGd+88Y+ddZHEruZcW6zoHGhRPkRRkPudjzNaJsECcgRTfJDL sow7HsW2kjZzvl7mjvNFmcON02Kvvu2PtfW7e5F2vsONGZ95c4waQPkrtaxUPyj2wS5D b/g3Ww+IO1mRax7XfL0UNoJ88oPmi+8CS6gd+uYZdeC5uL0/pGE/K3oHY+cjTthPJlRv 8nQfqKS0DtaOcAFRhy6Bc5tnjvJ7b1EidCKcuySL0smKK5v6LV57fcXg1L09PRiFB2EI Bb4C2swLrGqmf4O3vAY2LtocK/w1hNwtVvMJUbetVd7qavzVhcv9/kG7BRN7fhTjwMlT kUlw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f8si20063355pfn.43.2019.07.16.05.49.24; Tue, 16 Jul 2019 05:49:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732472AbfGPMsD (ORCPT + 99 others); Tue, 16 Jul 2019 08:48:03 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:50175 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726997AbfGPMsC (ORCPT ); Tue, 16 Jul 2019 08:48:02 -0400 Received: from pd9ef1cb8.dip0.t-ipconnect.de ([217.239.28.184] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hnMs9-0006w2-6c; Tue, 16 Jul 2019 14:47:57 +0200 Date: Tue, 16 Jul 2019 14:47:56 +0200 (CEST) From: Thomas Gleixner To: LKML cc: Linus Torvalds , x86@kernel.org, "H.J. Lu" , Masahiro Yamada , linux-kbuild@vger.kernel.org Subject: kbuild: Fail if gold linker is detected Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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))