From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B779C43603 for ; Thu, 12 Dec 2019 05:04:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 17DDE2073D for ; Thu, 12 Dec 2019 05:04:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nifty.com header.i=@nifty.com header.b="mZ1JIZHe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 17DDE2073D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 739466B35CA; Thu, 12 Dec 2019 00:04:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6E9D26B35CB; Thu, 12 Dec 2019 00:04:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D84B6B35CC; Thu, 12 Dec 2019 00:04:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0112.hostedemail.com [216.40.44.112]) by kanga.kvack.org (Postfix) with ESMTP id 49A546B35CA for ; Thu, 12 Dec 2019 00:04:08 -0500 (EST) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 052EF181AEF10 for ; Thu, 12 Dec 2019 05:04:08 +0000 (UTC) X-FDA: 76255297776.01.look92_6da4a0dd9d61 X-HE-Tag: look92_6da4a0dd9d61 X-Filterd-Recvd-Size: 4515 Received: from conssluserg-02.nifty.com (conssluserg-02.nifty.com [210.131.2.81]) by imf21.hostedemail.com (Postfix) with SMTP for ; Thu, 12 Dec 2019 05:04:06 +0000 (UTC) Received: from mail-vs1-f44.google.com (mail-vs1-f44.google.com [209.85.217.44]) (authenticated) by conssluserg-02.nifty.com with ESMTP id xBC540CC019559 for ; Thu, 12 Dec 2019 14:04:01 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com xBC540CC019559 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1576127041; bh=f0mX96dUj+4SSO7tlGuJjbJ2RUgELAxn1iGgSDGDbbA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mZ1JIZHe8zix2l9FjfNAniHgyI9oSvauhAcPoqTxKT2A4OdfQ6LoL/v8zbDHIMxYj mhDcjoSh0vEu+LtXS+MtkYAcpX3jOyRNJlre+cXE2vx+SKR622V+/EdoCDiv6L9Czp dtHzu1j68lvJTCpkBrcMBvfNBGz2s/SYZeCDlVHU3+Mi3/LVg1RrQyRG37YV2D6gEs 7MSFfyhR+rJYSoK/A9Tros/69wod/qLfHR/Wy8Lu7G3yKos64Goxe3qgV5XICmBHu5 BzgUVnck5bQ8tGq7xoCugzdLckDKpcc1wceT248Z9mjHWiNNHBELC/vO2+O8mLC1F/ GEeLkj0rANPTw== X-Nifty-SrcIP: [209.85.217.44] Received: by mail-vs1-f44.google.com with SMTP id n27so712167vsa.0 for ; Wed, 11 Dec 2019 21:04:01 -0800 (PST) X-Gm-Message-State: APjAAAVTxnya7IF8Nh8FWQz+H/pcARvDsMCm1C5ZcpECBzE8IN8QIhOA knAE+rZnk1bb2HHqD8nPZ4WZGqEki2gRHXariv8= X-Google-Smtp-Source: APXvYqwITbfxXfryxfdFs+wuDBH6lMreA653GFfyRlQshqBOwFIPRjFb2inNIzS8YEl1Z3dRS/b2hoN5oMNCFLezUXA= X-Received: by 2002:a67:7ac4:: with SMTP id v187mr5603811vsc.181.1576127040046; Wed, 11 Dec 2019 21:04:00 -0800 (PST) MIME-Version: 1.0 References: <20191211184027.20130-1-catalin.marinas@arm.com> <20191211184027.20130-3-catalin.marinas@arm.com> In-Reply-To: <20191211184027.20130-3-catalin.marinas@arm.com> From: Masahiro Yamada Date: Thu, 12 Dec 2019 14:03:24 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 02/22] kbuild: Add support for 'as-instr' to be used in Kconfig files To: Catalin Marinas Cc: linux-arm-kernel , Will Deacon , Marc Zyngier , Vincenzo Frascino , Szabolcs Nagy , Richard Earnshaw , Kevin Brodsky , Andrey Konovalov , linux-mm@kvack.org, linux-arch , Linux Kbuild mailing list , Vladimir Murzin Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Dec 12, 2019 at 3:40 AM Catalin Marinas wrote: > > Similar to 'cc-option' or 'ld-option', it is occasionally necessary to > check whether the assembler supports certain ISA extensions. In the > arm64 code we currently do this in Makefile with an additional define: > > lseinstr := $(call as-instr,.arch_extension lse,-DCONFIG_AS_LSE=1) > > Add the 'as-instr' option so that it can be used in Kconfig directly: > > def_bool $(as-instr,.arch_extension lse) > > Cc: Masahiro Yamada > Cc: linux-kbuild@vger.kernel.org > Reviewed-by: Vladimir Murzin > Signed-off-by: Catalin Marinas > --- Please feel fee to apply this to arm64 tree. Acked-by: Masahiro Yamada > scripts/Kconfig.include | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/scripts/Kconfig.include b/scripts/Kconfig.include > index d4adfbe42690..9d07e59cbdf7 100644 > --- a/scripts/Kconfig.include > +++ b/scripts/Kconfig.include > @@ -31,6 +31,10 @@ cc-option = $(success,$(CC) -Werror $(CLANG_FLAGS) $(1) -E -x c /dev/null -o /de > # Return y if the linker supports , n otherwise > ld-option = $(success,$(LD) -v $(1)) > > +# $(as-instr,) > +# Return y if the assembler supports , n otherwise > +as-instr = $(success,printf "%b\n" "$(1)" | $(CC) $(CLANG_FLAGS) -c -x assembler -o /dev/null -) > + > # check if $(CC) and $(LD) exist > $(error-if,$(failure,command -v $(CC)),compiler '$(CC)' not found) > $(error-if,$(failure,command -v $(LD)),linker '$(LD)' not found) -- Best Regards Masahiro Yamada