Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2646984ybz; Sun, 19 Apr 2020 06:24:06 -0700 (PDT) X-Google-Smtp-Source: APiQypIOUSk7HLTGJuEZ2PbKJkYEAXVcebaJDYJT1bh7U0VxtKYKH3Oiwm+kwco5WL6D8B7LS/0r X-Received: by 2002:a50:d78a:: with SMTP id w10mr10664582edi.356.1587302646410; Sun, 19 Apr 2020 06:24:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587302646; cv=none; d=google.com; s=arc-20160816; b=uENI9TbzmhU7WXhuQE+2q1nya7zEx2vfki196ywOliyZL1K1RvmYRCMKjj2YEhOtb2 a6ay/Ol9pwN7TuoSH2KY7U4VhdEdQ8SyWbHR4HAiax3jkD3C3iangIlZlHVHcq/OQP0j qnFFKyDRTKl1vmB7GTnlQumhFUO+xIu5O8YZvj+wl3nuwNHgYJLsXy/n4up2/cnYJLLx GXLWs2mHHnI0fqEkMZPb3YSDw1uSPLz3g4AJssMKerrgElde8FDnrPvZsQ+WDeb3lWDo 2P+bfxzD3U9ijpqmHa1wDz+wF3OtVJMfuIGgBjfasoG96ouO/w1cOXGS+WL1NwWKW2Dy qbtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/M/pO+rkWb7qCpPBJ9AKwpLrf9Cx4SmKeiQUlOV4LEQ=; b=bwtNNOiltdEq7hBqMD24mkoC4uv1Jl2dB0OWPlRMyXB4VSkzyWEHfoQuTqdPXHfyXA PzV+bzW6QMLVO0t/wHE8sHLxDBkyTzvJAFCT7ghoZMfiHSI/13lXWkFloebowWDMG9Z7 /m9fa1wDRp9/b9hucCjNhO6ePy1tlIt/vBp3SkEy39zCFEH4VzIfJeuWPc6ztuoU+hz1 CY83Sf7na5uiO3E/yvdhFOcxXGX+2tyDJb9UyO5KJZ5pvgmkAVczLUX/JBohuWFdqHL7 2AE7o6iFw7Vm0nSdPWsFh8Dr4HBuYpuMrsU4K6iyXgaOYGu37XIimET3PXmVXDo5hhaa cVRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=s+gLArrW; 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 z14si9336291ejp.19.2020.04.19.06.23.42; Sun, 19 Apr 2020 06:24:06 -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=s+gLArrW; 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 S1726036AbgDSNT7 (ORCPT + 99 others); Sun, 19 Apr 2020 09:19:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725905AbgDSNT6 (ORCPT ); Sun, 19 Apr 2020 09:19:58 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08412C061A0C for ; Sun, 19 Apr 2020 06:19:57 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id k13so7435074wrw.7 for ; Sun, 19 Apr 2020 06:19:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/M/pO+rkWb7qCpPBJ9AKwpLrf9Cx4SmKeiQUlOV4LEQ=; b=s+gLArrWtrhAjBDErGD/VpINDZzqnf/yyXHodON4rsDLNaeKvMEMdjtL6cDSOFI0rG HuV7HJdp9SeDHMt/r+7cMRI0siDrUYS5tUNKuShaTAbs2hI96PdyAKDsDm9pWQQPfNco Imm8IlccU1py5kh+nduW8yMm/9AwCNtpZLmO/kUWvFEIcl2dEwFGsi1vmXMDCX+GbaI5 G41cflVb/dYAu9CY/05JJl2hW7nX1PX5fQnolraQTMSWnpLougaSvMg6vx2xYTLS80f+ YnEfYLnIdP4X9hhAwH3xFOR6HVsEZZP1J0HhoJbKHZR/eDpALcsGJVyQnMxXAKNOEtM4 mf1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/M/pO+rkWb7qCpPBJ9AKwpLrf9Cx4SmKeiQUlOV4LEQ=; b=rinWpbJu7fAL5Eq9L3t/ExEEGFVrMEEUyw4Bk1Z2b2swvbPGLBkaYyPl8wPbAQw4q1 aOTbdKyGvxAQlKLlf7zqFomuFg7KKKkdN6MhaQfKeADeP1/H7H4P7U9naTD7v3pEvyD9 YZ7QUzvlI2EZp3LkgDAXSgt2U/hv4Oj7g4JvLndF9yiTAvdwbNOElKyeP3N7I3DlJzNE lmlKiRonoHyha9QCRbbfwS476yLldcVsFTQj1V+P7wqpA9txp92w8ZoQ7qK5HLhFhKT1 CLJPRbAd2DFeSkZkInqHC52eGnCbycE/KQY6g3ZafT5ngJNvsPlEKRUsvD4cgL95/de8 Nqpw== X-Gm-Message-State: AGi0PuZ3bK0X37wTNy7as+V1P74MCai8du4N9FVhSMRqZftaYrZwnM4c qd/ur6vxwWkMWfjdWpeHuEg= X-Received: by 2002:adf:b1d1:: with SMTP id r17mr11602814wra.85.1587302395769; Sun, 19 Apr 2020 06:19:55 -0700 (PDT) Received: from localhost.localdomain (x59cc9bd1.dyn.telefonica.de. [89.204.155.209]) by smtp.gmail.com with ESMTPSA id k184sm15681118wmf.9.2020.04.19.06.19.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 06:19:55 -0700 (PDT) From: Sedat Dilek To: Masahiro Yamada , Masami Hiramatsu , "Steven Rostedt (VMware)" , "Peter Zijlstra (Intel)" , Tejun Heo , Mauro Carvalho Chehab , "Joel Fernandes (Google)" , Patrick Bellasi , Krzysztof Kozlowski , Dan Williams , "Eric W. Biederman" , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Cc: Sedat Dilek Subject: [RFC PATCH 1/2] kbuild: add CONFIG_LD_IS_BINUTILS Date: Sun, 19 Apr 2020 15:19:47 +0200 Message-Id: <20200419131947.173685-1-sedat.dilek@gmail.com> X-Mailer: git-send-email 2.26.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch is currently not mandatory but a prerequisites for the second one. Folks from ClangBuiltLinux project like the combination of Clang compiler and LLD linker from LLVM project to build their Linux kernels. Sami Tolvanen has a patch for using LD_IS_LLD (see [1]). Documentation/process/changes.rst says and uses "binutils" that's why I called it LD_IS_BINUTILS (see [2] and [3]). The second patch will rename existing LD_VERSION to BINUTILS_VERSION to have a consistent naming convention like: 1. CC_IS_GCC and GCC_VERSION 2. CC_IS_CLANG and CLANG_VERSION 3. LD_IS_BINUTILS and BINUTILS_VERSION [1] https://github.com/samitolvanen/linux/commit/61889e01f0ed4f07a9d631f163bba6c6637bfa46 [2] https://git.kernel.org/linus/tree/Documentation/process/changes.rst#n34 [3] https://git.kernel.org/linus/tree/Documentation/process/changes.rst#n76 Signed-off-by: Sedat Dilek --- init/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/init/Kconfig b/init/Kconfig index 9e22ee8fbd75..520116efea0f 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -16,9 +16,12 @@ config GCC_VERSION default $(shell,$(srctree)/scripts/gcc-version.sh $(CC)) if CC_IS_GCC default 0 +config LD_IS_BINUTILS + def_bool $(success,$(LD) -v | head -n 1 | grep -q 'GNU ld') + config LD_VERSION int - default $(shell,$(LD) --version | $(srctree)/scripts/ld-version.sh) + default $(shell,$(LD) --version | $(srctree)/scripts/ld-version.sh) if LD_IS_BINUTILS config CC_IS_CLANG def_bool $(success,$(CC) --version | head -n 1 | grep -q clang) -- 2.26.1