Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1542562ybt; Mon, 15 Jun 2020 03:04:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/GF2DIy6rpdQBgQUH1SO3Jyg4CxA87ILACTPACijCWoQz5dd8ofWNZyAMZ9TRK44ZRrpd X-Received: by 2002:a17:906:81c8:: with SMTP id e8mr11677016ejx.361.1592215464683; Mon, 15 Jun 2020 03:04:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592215464; cv=none; d=google.com; s=arc-20160816; b=SWPR8c2YOxqmp2R9WekRItfsefQ3UWWOJbcmcK37gScX4SqeUEIBDfEmoHoBkET7oW gsxmgwNIOXYXL/WwVdmmZMWNuL71B3PpBv+QsPSqV3K6Exzikpg/tpxP/Jcs+MUfgg5g s6Eu9AEU8ok/RQaIayFvNP5EBNfLSC7vskX0kHjsJn7DgFfb8jwcUAlMIQmEn55GrRE1 fZ7jbiKM2ZMtOC7PtKEFcdtcyNZvptHD7nR0ZEDFojKgUylOfZtQ+9SZFP053gAqsVk3 eyrmAKihETCDCCV26cTxLaXnz1nBE2Q50woJdRBRVd3wQZWKVoMwV9o/tUCRK/COzt6C OkMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=YFBuj2YdZb8QnA5DusqkaylGmllgOAY9HMx92BKB6bU=; b=ZlD5Lbp6taSp+0wxXKxUNdWKYzVgbid2URA+5mB3FOaupCZG/ReVGa+lVFFzug9gLy QqCdl1ctEy8n9SkxA1WVPCeZO3DBjJWGXbuGkaWwLFpu+7wmYmLXPZCa8qSH6Yl/6IzH NlUXhadpKNjPZCavizHEJWgQ49KyCz3eCa6iAqwzwWKltmLvlFd5769JfhgKvbhJJtCy RqdKGPGN7XdiyrT53rbooyWPhBavUinf0nY44Vwej8Of4pB/fzZF1JqyLSITdsUwaEzq tC36z6vsd3J+JelrsKDJkQNxYToHJ3uyfhOGO44uAPDrVsoBFjKLELUWxdjFqhh5RqMH VhTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=j97I5KZb; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t9si8474435eds.213.2020.06.15.03.04.02; Mon, 15 Jun 2020 03:04:24 -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=@kernel.org header.s=default header.b=j97I5KZb; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729034AbgFOKAO (ORCPT + 99 others); Mon, 15 Jun 2020 06:00:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:50948 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726111AbgFOKAN (ORCPT ); Mon, 15 Jun 2020 06:00:13 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0E2A52068E; Mon, 15 Jun 2020 10:00:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592215213; bh=NclZlsh0JNDPCh7/tgM7lDu27PNeuUCqty414H60fo4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=j97I5KZbz9w21gUAN1DylupVwPgIjeFytHA4gPPAudiRlCwvnhaBcnTrzyVhV1D2Y XFel1vN89smdSsfXFsHkK2Jjr5D/tIr/dag7doSecgYiiJJUiJMpUYaXWkpnCLEHlE k+IVad79C8U9qrJvICVhkTlseaDwlnHZeXHbISeI= Date: Mon, 15 Jun 2020 11:00:08 +0100 From: Will Deacon To: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, Nick Desaulniers , Arvind Sankar , Andrew Morton , Brendan Higgins , Catalin Marinas , Changbin Du , Krzysztof Kozlowski , Mauro Carvalho Chehab , Randy Dunlap , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] kconfig: unify cc-option and as-option Message-ID: <20200615100007.GD2477@willie-the-truck> References: <20200614144341.1077495-1-masahiroy@kernel.org> <20200614144341.1077495-2-masahiroy@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200614144341.1077495-2-masahiroy@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 14, 2020 at 11:43:41PM +0900, Masahiro Yamada wrote: > cc-option and as-option are almost the same; both pass the flag to > $(CC). The main difference is the cc-option stops before the assemble > stage (-S option) whereas as-option stops after it (-c option). > > I chose -S because it is slightly faster, but $(cc-option,-gz=zlib) > returns a wrong result (https://lkml.org/lkml/2020/6/9/1529). > It has been fixed by a separate patch, but using -c is more robust. > > However, you cannot simply replace -S with -c because the following > code would break: > > depends on $(cc-option,-gsplit-dwarf) > > The combination of -c and -gsplit-dwarf does not accept /dev/null as > output. > > $ cat /dev/null | gcc -gsplit-dwarf -S -x c - -o /dev/null > $ echo $? > 0 > > $ cat /dev/null | gcc -gsplit-dwarf -c -x c - -o /dev/null > objcopy: Warning: '/dev/null' is not an ordinary file > $ echo $? > 1 > > $ cat /dev/null | gcc -gsplit-dwarf -c -x c - -o tmp.o > $ echo $? > 0 > > There is another flag that creates an separate file based on the > object file path: > > $ cat /dev/null | gcc -ftest-coverage -c -x c - -o /dev/null > :1: error: cannot open /dev/null.gcno > > So, we cannot use /dev/null to sink the output. > > Align the cc-option implementation with scripts/Kbuild.include. > > With -c option used in cc-option, as-option is unneeded. > > Signed-off-by: Masahiro Yamada > --- > > arch/arm64/Kconfig | 2 +- > lib/Kconfig.debug | 1 - > scripts/Kconfig.include | 8 +------- > 3 files changed, 2 insertions(+), 9 deletions(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 31380da53689..6eb18f45258e 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1564,7 +1564,7 @@ config CC_HAS_SIGN_RETURN_ADDRESS > def_bool $(cc-option,-msign-return-address=all) > > config AS_HAS_PAC > - def_bool $(as-option,-Wa$(comma)-march=armv8.3-a) > + def_bool $(cc-option,-Wa$(comma)-march=armv8.3-a) For this arm64 part: Acked-by: Will Deacon Will