From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C377C76188 for ; Tue, 16 Jul 2019 12:54:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 30F2E2173B for ; Tue, 16 Jul 2019 12:54:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="AkELagJ1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732768AbfGPMyx (ORCPT ); Tue, 16 Jul 2019 08:54:53 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:51426 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725926AbfGPMyw (ORCPT ); Tue, 16 Jul 2019 08:54:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xhpoIoqvW1VJHZbGo76qDnYFPD0KXuaoqgNk9c8CJVc=; b=AkELagJ1jf90vb6oxee/3qDgv HgR1FVs3sShL5SAO0VNewuCryMUIh9Ym0pv6qYUqwgv0Z+1SQbbLwYD/jJ9SLwshhKUnZADyJqT7e 6lsZAX/IQCCrICvcQlgOfjCKgV6n8McEoZBQdoGMplfYX+crTN+Pq2hC1H/KbcujApeq2V3icbGA3 HoHI7AVFF8Q08wNKAkU577dEjUlTyQpILETb2dt6dOiKoP7kyYMb81rpuLJ/xk1nauLwTrYEWHBlR JbiAUnmPY+1Pe9Qhsi12EU5DTsypRkGxtkQU0Waz9sOe09x2rhoM5F9o7rhbURBOcwuGJP1qvoc7M 24wR5XNOA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hnMyn-0002rE-D7; Tue, 16 Jul 2019 12:54:49 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id CB3EE20B172C9; Tue, 16 Jul 2019 14:54:47 +0200 (CEST) Date: Tue, 16 Jul 2019 14:54:47 +0200 From: Peter Zijlstra To: Thomas Gleixner Cc: LKML , Linus Torvalds , x86@kernel.org, "H.J. Lu" , Masahiro Yamada , linux-kbuild@vger.kernel.org Subject: Re: kbuild: Fail if gold linker is detected Message-ID: <20190716125447.GZ3402@hirez.programming.kicks-ass.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Right, life is too short to fight toolchains that aren't interested in working. Acked-by: Peter Zijlstra (Intel) > --- > 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))