From patchwork Wed Nov 7 09:40:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Murzin X-Patchwork-Id: 10672051 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5068C1751 for ; Wed, 7 Nov 2018 09:40:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D8AA2B93F for ; Wed, 7 Nov 2018 09:40:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3165D2B945; Wed, 7 Nov 2018 09:40:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D2A252B93F for ; Wed, 7 Nov 2018 09:40:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=93AD4MMw8ytPPsMf1e1FMuaxHkaTzilL3m9i4YrvS3M=; b=XJqY9I2XHT3bclEtYmfzuM1hp9 HuBX6wQZE+YcnrHgxB4YK9/clTr/qplPWJ1lMN+ntokOtAkdG3Hqxkba2iPjCnKd2XM3RjUAIxhNv ksPNQ5TnnXHRBxKp1FFaeHHOF/CvMXjg4OoAEr+1EOPwJpR+KHRD1BCfC+BljwHVco1mUqWe5nkYg WivOw60ZlKMd6uKrVGaca8F/u1c6ORfyrI8yhhs3EkeNQeSu1gScmb08sBPHkv7WFgC3spLIuS6E9 GyQl5KrCpwJvOMqlMDvD3OLb6NANnqynp8fXzzk4W9vD8DfNE52dPv1iYzb3psbgZtSAYegnl6NU5 mcEjxolw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKKKH-0007lP-CK; Wed, 07 Nov 2018 09:40:41 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKKKA-0007l0-Lz for linux-arm-kernel@bombadil.infradead.org; Wed, 07 Nov 2018 09:40:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: 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=P2dr0jVr4vldaQs8XWaDDGIJYGCEoiKeux/ppVfCW9M=; b=pdflrNlIBWBrOeG9JIfsuzvHC mgtxqlm2eNmFngLXT0LQJ9FTpJUIDJW0WM137ZROoG1SJq2E9gHyuHFU/YXuVbwEWHdVGBgCu6D1Y MlqKjHcWxqOsan1sVjGrOX3O+EuF0k/OSeUeCS812cLUSngZPuddB8CFrnPIbXcSjLgzeEl5wWHWW EZNDgZ2kHz+W/cjOGQovDXY9D6Mhe1nkyy7XRLqh8WaTq40tvO5xOiUJJUkeUh6Z0nzkfo+Omxqq4 c+S0dYtIwtVz7bwumGyt5CCQuNDtrsbm2ojZPGus2X8PuHZrpnFMx88/snBCV/LSzRTDIp0Zr08yP +ydPotZ3w==; Received: from foss.arm.com ([217.140.101.70]) by casper.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKKK7-0001xA-5v for linux-arm-kernel@lists.infradead.org; Wed, 07 Nov 2018 09:40:32 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AC0691596; Wed, 7 Nov 2018 01:40:20 -0800 (PST) Received: from login2.euhpc.arm.com (login2.euhpc.arm.com [10.6.27.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2B1CD3F718; Wed, 7 Nov 2018 01:40:19 -0800 (PST) From: Vladimir Murzin To: linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 1/4] kconfig: add as-instr macro to scripts/Kconfig.include Date: Wed, 7 Nov 2018 09:40:05 +0000 Message-Id: <1541583608-26375-2-git-send-email-vladimir.murzin@arm.com> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1541583608-26375-1-git-send-email-vladimir.murzin@arm.com> References: <1541583608-26375-1-git-send-email-vladimir.murzin@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181107_094031_373655_9A758AE6 X-CRM114-Status: UNSURE ( 8.98 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kbuild@vger.kernel.org, Marc Zyngier , Ard Biesheuvel , Will Deacon , yamada.masahiro@socionext.com, kbuild-all@01.org, linux-crypto@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP There are cases where the whole feature, for instance arm64/lse or arm/crypto, can depend on assembler. Current practice is to report buildtime that selected feature is not supported, which can be quite annoying... It'd nicer if we can check assembler first and opt-in feature visibility in Kconfig. Cc: Masahiro Yamada Cc: Will Deacon Cc: Marc Zyngier Cc: Ard Biesheuvel Signed-off-by: Vladimir Murzin --- scripts/Kconfig.include | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/Kconfig.include b/scripts/Kconfig.include index dad5583..07c145c 100644 --- a/scripts/Kconfig.include +++ b/scripts/Kconfig.include @@ -22,6 +22,10 @@ success = $(if-success,$(1),y,n) # Return y if the compiler supports , n otherwise cc-option = $(success,$(CC) -Werror $(1) -E -x c /dev/null -o /dev/null) +# $(as-instr,) +# Return y if the assembler supports , n otherwise +as-instr = $(success,printf "%b\n" "$(1)" | $(CC) -Werror -c -x assembler -o /dev/null -) + # $(ld-option,) # Return y if the linker supports , n otherwise ld-option = $(success,$(LD) -v $(1))