Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp2028067pja; Thu, 26 Mar 2020 08:32:51 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs/gI0jGC3IXPl046doF9YLFV0uY5KuFwXOlN/DMXvNC2pZs+6Clp2wcR7VDLyR+gFZ2WIL X-Received: by 2002:a9d:12ce:: with SMTP id g72mr6692094otg.350.1585236771075; Thu, 26 Mar 2020 08:32:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585236771; cv=none; d=google.com; s=arc-20160816; b=Ol+13sprOXcnrMrH7NVYEFqD9XE3Vb/mZtAGGNoHHgb3xSTuJexTHOuuQZjlODMLbm ufnNzpyR4G1bU+GAYecvEwAVhbChqXg48Cp2Yo+FgzRbpV9dj0JOAIjNFmu9hh6XOXPZ V++3kRrrnfgraPTDSpOC2+4W0yzkQeAXwFvswhyhnOEt674iuDA2w20eDZ3sh+06NJPV JGM7tFC6PfnO0EnAOC/nGt7HSWl8jMUBtFXACRhbxBpFKZvHNAjTNZvSWPUFKcYAq8Ew aLVNXpD5NNT+mYoKpJSAPOFBkvK8V/MR75xvrovyC4LMiwIePz+TpKqNBZtpJK9SxPYR it6A== 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=3256LtQqLSQnNW/sPTsEZ/xV5y4K9PDixobjFuGy/Ng=; b=mXOUrb8lNARJe/U5Kg73oamxz1YgDaRMZy2VVIOHaDjx6k8hQhnXCeG4ec6VvzSrgK QGnhdzpmjLJzrH1gYn1y1cAla8kDijum63hHLMOl4BQY6tGavQWT8Njte/wJw0F9DY4E dMQNkzMTF8ZnJ+sqICKW5pPhnqpeJvcZtQVT8vjHK+X9pv0xKuLA95fL51c6F/ZqfEIU bvgKBO+EYjezsefCfqNxFT3snu41XjSForJdU0dRt45FXyWWVo60bX8Pyyw26cOYL7vC lwTWrAIlwR+8qexeHg7kZrprbsjcPYfRqSH3Il4V/nvYwURXzNqLa5okIgMREul9+raT YO6Q== 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 u137si1063512oie.160.2020.03.26.08.32.35; Thu, 26 Mar 2020 08:32:51 -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 S1728117AbgCZPcP (ORCPT + 99 others); Thu, 26 Mar 2020 11:32:15 -0400 Received: from foss.arm.com ([217.140.110.172]:34072 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727345AbgCZPcO (ORCPT ); Thu, 26 Mar 2020 11:32:14 -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 4B3657FA; Thu, 26 Mar 2020 08:32:14 -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 6700E3F71E; Thu, 26 Mar 2020 08:32:12 -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 1/2] init/kconfig: Add LD_VERSION Kconfig Date: Thu, 26 Mar 2020 21:01:59 +0530 Message-Id: <1585236720-21819-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 --- 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