Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1637441pxa; Thu, 20 Aug 2020 16:59:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxssWp68EUqvTmIxQ0zWp9wXieXFGds4jNH/fBxfzBP8FdK2k2c3F49fskkRDAcZWJmXRBt X-Received: by 2002:a17:907:72c8:: with SMTP id du8mr226690ejc.237.1597967978482; Thu, 20 Aug 2020 16:59:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597967978; cv=none; d=google.com; s=arc-20160816; b=wQ3ymx6IzhB4tOOZpsAj1k7oBz3zQd32gQbiKzdP8zNjQOzYglr5Tqzj69qPsnZN8T NWtqu06NcKBSweywDp+9YCUxza0yFlj8fFwh2meQEv7HD3xRhb4RBQKVPNHeO1hVJb1q 3eX+u6uHS97aL3EFMU4OFh0ocXmVe73F31buwpYxQPULx73R0877fJ4eZA9qG6CtgxNP qa0G35w5UcZ/uD6YaIB3DsDprByBMBWuW6004U6J01uIja9ATN6hKyFAea098zQQdM/i +R/6YadYErC2yYsRA9Bree4EVVGTy8PXoEC8/3kibokJtYuvYC3a47C3ULI41YAWxDdO /1Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=UFbUcaXhdibf9fMHCSPTDSV1bpL4d5QWyfKneZ3Yr/k=; b=gBic9mqS+fXrbLIJLjceKPiusbIJCNbifNqG+f8Vb6Kbqx+P1Y2G0Mo3EIA0BSCxxl /7oerSkCyWGAj7FoDfVOFcxTWLTV5ZSdGxDwHIZU0vZp7AjOfjQPsxPbF2WJplBOPTLW vbqzvBiKrykWZYAT1pvhV521NZJ2xEO8gj1vSoAmLabnT7LwNwlYnGfdZMUrs/xye+Fz YUQNQgiDBmmUgjby2KYkbfRTX/CNVm6zL/IpNHkbxBHWBokM3/LL1Tur4oPb5+yM4rKD uU9uEqaSFdMV07w+TGscIuCQ56ZU7TXdhNqgI0t7qousFidyxQP3n/fVC7JEUOPG+sHZ e7sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gksUqMBT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o9si65330edq.412.2020.08.20.16.59.14; Thu, 20 Aug 2020 16:59:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gksUqMBT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728439AbgHTWVD (ORCPT + 99 others); Thu, 20 Aug 2020 18:21:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725852AbgHTWVC (ORCPT ); Thu, 20 Aug 2020 18:21:02 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB690C061385; Thu, 20 Aug 2020 15:21:01 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id 2so56133pjx.5; Thu, 20 Aug 2020 15:21:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=UFbUcaXhdibf9fMHCSPTDSV1bpL4d5QWyfKneZ3Yr/k=; b=gksUqMBTx2CP5k0wbpGbdJJvf7ARiR+SbfUrL6+UWsCFWKDY2Sb2PUy0DeRIgms/w/ QcOe1u4xHbHDCd+chUbSefLJRAYscqQu+q1hEeIl6wJkQB+jNbhUU2A3Nh+bXJZVD0Do dRElyGG8M7RDxyQHMeLvx5cxoXk3o/uMdM9rI/t0O9BIIoHgSFKjpHZobH/Uo0ZlYN6D +R+XzTTYAoXb3hFNCadfsx8OsuwtrqPhxcfOuYhG4Y41LPAIGlSaXVokFpK0tEgwtosJ wIQsYENducWCwiL4YtbNkQVjlgSXMGY34WNKGbAjbl2QFEcVnTCMCffTVLd2OKFBMbny QANg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=UFbUcaXhdibf9fMHCSPTDSV1bpL4d5QWyfKneZ3Yr/k=; b=DDBT2bNb8y+KoGf8ANFez6/3CBEYDa4nJWJ3zk3mUjsXa55BiZYRcl1AC45bWtJ6S3 QXG16qC/5boeFJZFlJZ7B01gd+VmeQpEFXZgRgaF5RhhZO00dpmTVN2GKR1MmweznXpN LLQJMuLxV3uHZXYhlVA6GgUGbN+mkxhIw5YuYDbicqsTXqQQbvZLSfj+Bw6UhvlaMif2 dr4mANMr2AFVEwS/qtHSkV/3yuV3DWComXv1vBS3fYAd4lerH0OQTVLCmgHQ/FE8ZxSB 39mo7WquwwaPoD8Ju05WXnb1yRTKlrEO+GUQbTanRq0YgzDsaQsMiNrJ+gK/wN4EVdiK eLCA== X-Gm-Message-State: AOAM531SUvm5KtDZv2gZZ0dCh4An5p662ziLsNHc40vT0dQjZjcWtoFO VAlvB/hJnoVXdR5QVQXmKhY= X-Received: by 2002:a17:90b:8c5:: with SMTP id ds5mr365851pjb.110.1597962061288; Thu, 20 Aug 2020 15:21:01 -0700 (PDT) Received: from Ryzen-9-3900X.localdomain ([89.46.114.77]) by smtp.gmail.com with ESMTPSA id w23sm49072pgj.5.2020.08.20.15.20.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Aug 2020 15:21:00 -0700 (PDT) Date: Thu, 20 Aug 2020 15:20:59 -0700 From: Nathan Chancellor To: Nick Desaulniers Cc: Masahiro Yamada , stable@vger.kernel.org, Matthias Maennich , Michal Marek , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] Makefile: add -fuse-ld=lld to KBUILD_HOSTLDFLAGS when LLVM=1 Message-ID: <20200820222059.GA10485@Ryzen-9-3900X.localdomain> References: <20200820220955.3325555-1-ndesaulniers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200820220955.3325555-1-ndesaulniers@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 20, 2020 at 03:09:55PM -0700, 'Nick Desaulniers' via Clang Built Linux wrote: > While moving Android kernels over to use LLVM=1, we observe the failure > when building in a hermetic docker image: > HOSTCC scripts/basic/fixdep > clang: error: unable to execute command: Executable "ld" doesn't exist! > > The is because the build of the host utility fixdep builds the fixdep > executable in one step by invoking the compiler as the driver, rather > than individual compile then link steps. > > Clang when configured from source defaults to use the system's linker, > and not LLVM's own LLD, unless the CMake config > -DCLANG_DEFAULT_LINKER='lld' is set when configuring a build of clang > itself. > > Don't rely on the compiler's implicit default linker; be explicit. > > Cc: stable@vger.kernel.org > Fixes: commit a0d1c951ef08 ("kbuild: support LLVM=1 to switch the default tools to Clang/LLVM") Minor nit, "commit" is unnecessary here and might be flagged by some tag checking scripts. > Reported-by: Matthias Maennich > Signed-off-by: Nick Desaulniers Regardless of the above, this should work fine so: Reviewed-by: Nathan Chancellor > --- > Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Makefile b/Makefile > index def590b743a9..b4e93b228a26 100644 > --- a/Makefile > +++ b/Makefile > @@ -436,6 +436,7 @@ OBJDUMP = llvm-objdump > READELF = llvm-readelf > OBJSIZE = llvm-size > STRIP = llvm-strip > +KBUILD_HOSTLDFLAGS += -fuse-ld=lld > else > CC = $(CROSS_COMPILE)gcc > LD = $(CROSS_COMPILE)ld > -- > 2.28.0.297.g1956fa8f8d-goog >