Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2354048ybb; Mon, 30 Mar 2020 04:43:44 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsp5BfL+Sf1wsFQXAPiL2WTRy1RFXWdDT7P5b0/tM4nCQ3CTYxEqXdZKS2w9zrgi4W/hEU4 X-Received: by 2002:a9d:6303:: with SMTP id q3mr8973419otk.296.1585568623944; Mon, 30 Mar 2020 04:43:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585568623; cv=none; d=google.com; s=arc-20160816; b=wNTx5rCXbFXuwKYT0PDqS0XLcQ0zJ9fidh00LVWq7kL7dGUYUbmWuEu8MEb4Kq57Ga BPibUg8i46g/Cv9Jh8Sja88pElIFZ5ywbBHipRDvKeJwEK1nRKL0n833FdN7olYk0CHy vA8d9/kMBVYZq58x63HuCOMnl6s8JwqJqYXeiq7Zu7+RV0OP1uV74cOslfuUaGM/B64V wH6FqKdBoCfir+pwEWPgoZ2wyr6J4vyfDQWTl3zErGohhfjMAiYeY3l32jXEtJSge81z AUMK9vMcymqrOmLZviPpLT6y62R5sMXx5fcAQtyVDGXrf/NwHawhnecT9HC0coOYBYTj cV4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=kw8TUzFvEK8CN6xAyfEUGX+1K+GuTPkwrj8piYeuc9E=; b=GsJlqP6tnVAtWTxJB06MOuZAM6Am6gPi25/IzF0i9P3nmU0yXANQ/hdyVLovn7FN0H nRyMAbZKMeuFnc3KEEInm1SqpEjhLaHIq+Dnf8tWKiCMJugN3tzmpHh5k1/CEse7sAGU Iygwh6L+SNXTwX6huDPPQZ1CWUOldezZPhraG9nJoUQOvo7DJ+qe8A5D+ouy/znlrdl3 NoHdcA8btmtnxAOLI0cD88R6gwDN9N4u4wMNadV0n0GzsouXQA2y3dpj0RfyDXwY0+5B fIzxs0aeW3qLUHNPQmXpVzTGa/Kg9mbmsnlD+vvqPN8Hu3tr1ky/8JLmjWLlXHF8BpeC GSgA== 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 o14si6172119otl.122.2020.03.30.04.43.26; Mon, 30 Mar 2020 04:43:43 -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 S1729785AbgC3LmB (ORCPT + 99 others); Mon, 30 Mar 2020 07:42:01 -0400 Received: from foss.arm.com ([217.140.110.172]:51330 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728764AbgC3LmA (ORCPT ); Mon, 30 Mar 2020 07:42:00 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 484FD31B; Mon, 30 Mar 2020 04:42:00 -0700 (PDT) Received: from a075553-lin.blr.arm.com (a075553-lin.blr.arm.com [10.162.17.24]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 5997C3F52E; Mon, 30 Mar 2020 04:41:58 -0700 (PDT) From: Amit Daniel Kachhap To: linux-arm-kernel@lists.infradead.org Cc: Catalin Marinas , Will Deacon , Vincenzo Frascino , linux-kernel@vger.kernel.org, Amit Daniel Kachhap Subject: [PATCH v2 1/2] init/kconfig: Add LD_VERSION Kconfig Date: Mon, 30 Mar 2020 17:11:38 +0530 Message-Id: <1585568499-21585-1-git-send-email-amit.kachhap@arm.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This option can be used in Kconfig files to compare the ld version and enable/disable incompatible config options if required. This option is used in the subsequent patch along with GCC_VERSION to filter out an incompatible feature. Signed-off-by: Amit Daniel Kachhap --- Changes since v1: * None. This patch series is based on Linux arm64 for-next tree [1]. More details of this work can be found in the thread [2]. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core [2]: http://lists.infradead.org/pipermail/linux-arm-kernel/2020-March/720257.html init/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init/Kconfig b/init/Kconfig index 452bc18..68ddbcd 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -17,6 +17,10 @@ config GCC_VERSION default $(shell,$(srctree)/scripts/gcc-version.sh $(CC)) if CC_IS_GCC default 0 +config LD_VERSION + int + default $(shell,$(LD) --version | $(srctree)/scripts/ld-version.sh) + config CC_IS_CLANG def_bool $(success,$(CC) --version | head -n 1 | grep -q clang) -- 2.7.4