Received: by 10.223.185.116 with SMTP id b49csp4042659wrg; Mon, 19 Feb 2018 10:03:25 -0800 (PST) X-Google-Smtp-Source: AH8x227kHA7zSRZx0X536Vh32LjNUSHFpzIiC+UatvF4H5xaBiz0GcGUGFTxaDmfJi+xWLynOa2E X-Received: by 10.99.100.67 with SMTP id y64mr13146656pgb.145.1519063405766; Mon, 19 Feb 2018 10:03:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519063405; cv=none; d=google.com; s=arc-20160816; b=nR92/A8lGpicb4rTjN2kGgGsN95ETxPnlMNaLyamxpowkIzHNV1Lhia6jJBQiggOHx IJ0yPFs1hJg1TbLAN1kQqOsd8JQCyUqb+jwPggcxfUfgwxDNwVTI4GfEIuCNNTUYH0cM A8/1Osg/eN1ie9q4+ZfBUd5Yt/CC0XEdkgNCYM0Kondejso10NdkH3jkiWR8rjbhh7xu AyXZIuo94ZhSM319T5pLrobkob23XwVcX3J9Xk0XYbiYRX6LUm6c8NabzU+/lHFwVV72 jtpUoT9VRazeL4ZiKfFoYynQ9Zz+s5lmllsfczFLpoJJKGfpH8qf0uEyLZt2GOS1KePc fjnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=D431nH4uraH26hudm9RfCf6WzTWGjisC1tteRyGypHM=; b=eDF4EPSB1wQD2b9yhcwSqZg8WCW0ZaHIK/WOQHDwSYuYDEEBJrkbuQ/+WULuOIRRXw 8U4W353fNsn/TZGE5b/8kyCneV0I4yp11ZRmRMttcAToDgPhyz3S/FktryDMf3uuB7wO 0+l8UUCJfDrG0K02aqHnRlrVmBMlgoT2vtzA8v6TomvKoxlwCldKkYGPe+Ggq3C590lS 8LE6LspsnB+oSPrv3VJZafMoepF5sEe4YSJWckiNMSpzCKM/w2ATJEAuYftvqYyWWHBF h/unt298SEj+/Fx4L94o28Nvg07Kbz4HUvU7oeKV9Ge1hFIRFZEzEaFZJchOscyKXRy3 4D/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=S9Q0hnVt; 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 w25si4651318pfk.99.2018.02.19.10.03.10; Mon, 19 Feb 2018 10:03:25 -0800 (PST) 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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=S9Q0hnVt; 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 S1753421AbeBSSBw (ORCPT + 99 others); Mon, 19 Feb 2018 13:01:52 -0500 Received: from mail-it0-f47.google.com ([209.85.214.47]:51792 "EHLO mail-it0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753185AbeBSSBu (ORCPT ); Mon, 19 Feb 2018 13:01:50 -0500 Received: by mail-it0-f47.google.com with SMTP id o9so6009184itc.1; Mon, 19 Feb 2018 10:01:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=D431nH4uraH26hudm9RfCf6WzTWGjisC1tteRyGypHM=; b=S9Q0hnVtlVPqi5BfI7dhjnxjMfYULBVwIe0e46sloftEdsv6zYl7ADN+YDD/fPsXab zR9FxkCh9ZapKDhkKdX5gAHbaaoA1TGmYKizBqZ8o8BfMXeOSiOdfMfleRvdy4I8qRDL 6I3pLkvJhPEP/Kjk4cInrR1H3BgdoT7RUpzX+ex0djr7zC+Yf1TDfrqg36RY+FM6Ko2y ux9d12a2YqIosBaywdTETT8dLPUCXlJDaXVdGuZvzyns8m3SEPZKyMlbDwVeup70bbIg ESFEOB3WmiLwbFh+vWtJM9KWQZus9AocZ6HJ0ruomRBpvWcweUS0sBCoygmHo+kpWxvE B0GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=D431nH4uraH26hudm9RfCf6WzTWGjisC1tteRyGypHM=; b=iMXNjfEbHlLJl2Go/2s29d+9M/evYYmR/307TG14MJ37+kYLhfWHw0p4aznBa+vYeg ui5GNIuyq7e53RYlIEO4aIm8P5DZ0bov1/kJyAjr7EyBekOYD3TXzZQUefjyrr0N+fgM fbXHoE9GzHqQnBCRFpUT7GXj2fllFvBcaLvFNpROAREVfBBspYPukU1iNazYIxcbEQYG EhzbuG4KsTILhvUcpbjAEZJ5o8MwXQlYsN/3AXlDurg40f2+uDKj9TDSMgGad+GZ6sdS DJbqzc/Z2sIj7TrdQdTirdEEY0RsvjatGyGdeM1lH091BFeUHurWmRnFhGpSJ1vYaifW o47A== X-Gm-Message-State: APf1xPCuf2DLo1zB5o1EZOCsD64ZPTLpS8+o6XavqD+dEtsTKSY4uqsg nDrIQVC3ZcZITtp2O9Md01HGoibKrsfQXAq7zn4QlldI X-Received: by 10.36.150.134 with SMTP id z128mr18760685itd.108.1519063310032; Mon, 19 Feb 2018 10:01:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.135.221 with HTTP; Mon, 19 Feb 2018 10:01:49 -0800 (PST) In-Reply-To: References: <1518806331-7101-1-git-send-email-yamada.masahiro@socionext.com> <1518806331-7101-12-git-send-email-yamada.masahiro@socionext.com> <20180219044845.7cnqpgyiinn6hkyb@huvuddator> From: Linus Torvalds Date: Mon, 19 Feb 2018 10:01:49 -0800 X-Google-Sender-Auth: e-scQpScvHKUmUEpO5iY3zDvhww Message-ID: Subject: Re: [PATCH 11/23] kconfig: add 'shell-stdout' function To: Ulf Magnusson Cc: Masahiro Yamada , Linux Kbuild mailing list , Greg Kroah-Hartman , Arnd Bergmann , Kees Cook , Randy Dunlap , Sam Ravnborg , Michal Marek , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 19, 2018 at 9:44 AM, Linus Torvalds wrote: > > I do like your "success"/"stdout" more than "shell"/"shell-stdout", > because with that naming I don't get the feeling that one should > subsume the other. Hmm. Thinking about it some more, I really would prefer just "$(shell ...)" everywhere. But it would be nice if perhaps the error handling would match the context somehow. I'm wondering if this might tie into the whole quoting discussion in the other thread. Because the rule could be: (a) unquoted $(shell ) is a bool, and failing is ok (and turns into y/n depending on whether successful or failing) So config CC_IS_GCC bool default $(shell $CC --version | grep -q gcc) works automatically. (b) but with quoting, $(shell ) is a string, and failing is an error So config GCC_VERSION int default "$(shell-stdout $srctree/scripts/gcc-version.sh $CC | sed 's/^0*//')" if CC_IS_GCC default 0 would need those quotes, and if the shell-script returns a failure, we'd _abort_. Which is actually what we want there. Hmm? Is that too nasty? Linus