Message ID | 1526537830-22606-15-git-send-email-yamada.masahiro@socionext.com |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1877699lji; Wed, 16 May 2018 23:19:42 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrVAOlNoMtXiGgtK/sXp0ooCXbx+0cRMsozTvtJxVPAYNDRcSOYndj8z+QMKA0aX7Vxo5Is X-Received: by 2002:a65:5003:: with SMTP id f3-v6mr3094445pgo.433.1526537982632; Wed, 16 May 2018 23:19:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526537982; cv=none; d=google.com; s=arc-20160816; b=OzWhJre+rGV+9uL0hAt3ULqooNCQATK9eZ4v19hJQXUocceDZqHgFBcX8dPo5tffQZ Nh9Pj3cdc3Q5colu543wmCAQUIACZ1zs/k9Z95K1pfsyrBJ/f80HCWkQ124cmhULPp1f R388czx4TFTpwbgBjtG1AiTn/8KZqTBq1g2CJ4lXB0z/Lep4NT8Az5vp+g5Io2wYNYWk MZq7RcjMNaxciGFf9S16NQwenwnJ7uJlQQ1oj+L8mfpKYhDRvZ9yya5iBjTotrXOu3TQ Xckafh/b8p7cmFNQDgC+teKzgU7/PHof05OYeJoJkvGWI6T0EyAsxD9d5naxBW6Hi1rJ 4AJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=+5C5BFghK8bNbBruQh4ridmWGCySFXtqLkuilcFvcew=; b=FGsBPXAv8rbSQVSIfmuCXUhw3UXTjV64D+f1Smect2a9jhrF/hOkAhyfnFFex7so1M xuYlqKL23hVgQarbm0PimMaOK4OY7NrS7MoivBTZRM5dx74N7fQoDnADZ/X0X5nJwrkT YZx513SYkgIPMQTOW2NE5sBxrpkOb5NrzV3GRUDucHwVMoXGw3Deg8tSfXNUa6UCs3t2 D+z+n8b2eWWprowpBe6cdV3RvgbpBkA0AYoF52B/jCcIeoRml8gUM9agdj/XsgrA0zVP XlXTJ5QfOiYAKlUVfN8tMGQcRUxJ+axJ8I+LDxXRUwdseGEEf1t7i6rQMem271uYsEoD ld6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=MT2MrnTO; 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: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g11-v6si4561765pfk.187.2018.05.16.23.19.42; Wed, 16 May 2018 23:19:42 -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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=MT2MrnTO; 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 S1752309AbeEQGTk (ORCPT <rfc822;ramon.fried@linaro.org> + 29 others); Thu, 17 May 2018 02:19:40 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:25643 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752276AbeEQGTh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 17 May 2018 02:19:37 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id w4H6HbUC002841; Thu, 17 May 2018 15:17:52 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w4H6HbUC002841 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1526537872; bh=+5C5BFghK8bNbBruQh4ridmWGCySFXtqLkuilcFvcew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MT2MrnTO8WL69sW6/9er0RNt7gzuoy4H2HRq+N7+GvsG53PcKtTOfk6jXQo0YB2G+ epZd4VFAJ1BuyDXYx2Xxv/DqTl5HJkK0DmHx4KK2vbjqAOz9RqonFrpm2KIrpVY4D7 IbqQznYeebY+UMKd4V7ChmmKPy6usH+SvScP8Oh4SWq7YqiERCb7ru4jlQ4AWTfCTf tD/AigfshL1IWGW6t+FzR7oZStSsD9MCPppda7AiVGwHDB5aK1AFaKqkCwUQ5btaPZ WgcwUUnz2YC+NV31bYvZV57tFHNHyZqJWsUCypt07s3qtzGFVcDhlcWNQnCEVzjhqk 5QIaT8QRqFOLA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada <yamada.masahiro@socionext.com> To: linux-kbuild@vger.kernel.org Cc: Linus Torvalds <torvalds@linux-foundation.org>, Sam Ravnborg <sam@ravnborg.org>, Ulf Magnusson <ulfalizer@gmail.com>, "Luis R . Rodriguez" <mcgrof@kernel.org>, linux-kernel@vger.kernel.org, Nicholas Piggin <npiggin@gmail.com>, Kees Cook <keescook@chromium.org>, Emese Revfy <re.emese@gmail.com>, x86@kernel.org, Masahiro Yamada <yamada.masahiro@socionext.com> Subject: [PATCH v4 14/31] kconfig: expand lefthand side of assignment statement Date: Thu, 17 May 2018 15:16:53 +0900 Message-Id: <1526537830-22606-15-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1526537830-22606-1-git-send-email-yamada.masahiro@socionext.com> References: <1526537830-22606-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
kconfig: move compiler capability tests to Kconfig
|
expand
|
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index c68ca56b..ae33e9b 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l @@ -114,6 +114,13 @@ n [A-Za-z0-9_-] yylval.string = text; return T_VARIABLE; } + ({n}|$)+ { + /* this token includes at least one '$' */ + yylval.string = expand_token(yytext, yyleng); + if (strlen(yylval.string)) + return T_VARIABLE; + free(yylval.string); + } "=" { BEGIN(ASSIGN_VAL); yylval.flavor = VAR_RECURSIVE; return T_ASSIGN; } ":=" { BEGIN(ASSIGN_VAL); yylval.flavor = VAR_SIMPLE; return T_ASSIGN; } "+=" { BEGIN(ASSIGN_VAL); yylval.flavor = VAR_APPEND; return T_ASSIGN; }
Make expands the lefthand side of assignment statements. In fact, Kbuild relies on it since kernel makefiles mostly look like follows: obj-$(CONFIG_FOO) += foo.o Do likewise in Kconfig. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> --- Changes in v4: None Changes in v3: None Changes in v2: None scripts/kconfig/zconf.l | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.7.4