From patchwork Sat Dec 9 16:02:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 121288 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp839287qgn; Sat, 9 Dec 2017 08:05:12 -0800 (PST) X-Google-Smtp-Source: AGs4zMbwaAJlLSyS2MimR9go7/kRjKtnVCE8uiMAhVg4szH2+17DXAdYzWI8ZXPFaeC9l0bg8weA X-Received: by 10.98.99.68 with SMTP id x65mr2081666pfb.56.1512835512265; Sat, 09 Dec 2017 08:05:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512835512; cv=none; d=google.com; s=arc-20160816; b=Bjd49AA6dtwe2Q4ADN98zxaku3xHX4z158hinV8KOp1dhE1mNQexd/aLyEP3cRt6VP c5iqrPYDc3Ows37jO7B/7xrFBxMsoWJRu8VslNzxY8zuaRnhasUJBPRDmTBKj9z9Q4wT SFYC/X7pg6ZSU6LdlJkCDpdx5cOCB4x6yKOdOSybBK71YuqOd5RRjVnHMkoURVpiBmcB vTql8lq2ymdDc4xmsZv+R/Xb3JlqnUQJIkX/EcIqkufCw39JRnsLxIcuUAodrUx/sQGR WNBOmMuC6uSS74qTAZER2AztKHYMs3Xca7rmeNQuSzyhOm0xv92TjZFie8hrj7uEigv7 trtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter:arc-authentication-results; bh=GhI2Ke+UsxptHJB4ibEO5/eIU2WEnJ7FOPWy1aaet3Q=; b=rPcbDnH5vDHOmGh9vtW2BAm88xopXVNqSOCa8qS7CTvgdi/pdFiL57g8UmD2yPxrPG co9+xOkEqrmC5qrP4+MhpXe6LYUC0g/zAp6ZhzrdqC9XsguGIZS2qKHQra2Tmwh2o/bo kjV77563thckeQOfXmqILkjoUhPNxBJNkyE1HXjwlmwVHB3loayAXe5CCNr22CLiwKtS 5IzfH1AmdVWgs2XLQkJj9DdVSba0lLMeYb4lCe/TzIQ6delzGtPUkkXfO57ZoXjMntIK bfeP32Vsf8YGQ+hgYyF2ehAE0wWhn3/iejyCMmmXP+LzuNTs4QAfwSsZXTMDyezBEU2M OTOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Yx8KBrIX; 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 v72si8074796pfa.126.2017.12.09.08.05.12; Sat, 09 Dec 2017 08:05:12 -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=pass header.i=@nifty.com header.s=dec2015msa header.b=Yx8KBrIX; 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 S1752078AbdLIQFJ (ORCPT + 20 others); Sat, 9 Dec 2017 11:05:09 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:36994 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751720AbdLIQFF (ORCPT ); Sat, 9 Dec 2017 11:05:05 -0500 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-11.nifty.com with ESMTP id vB9G2gjY027275; Sun, 10 Dec 2017 01:02:42 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com vB9G2gjY027275 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1512835364; bh=GhI2Ke+UsxptHJB4ibEO5/eIU2WEnJ7FOPWy1aaet3Q=; h=From:To:Cc:Subject:Date:From; b=Yx8KBrIXBQ1HX7DxPY4VaG6reKuHvE6cvSvl8hOjBPQS4m8CmPgJ6kd7zjSMXQLss PXAA/ipottCK5Tm2UD7rYnJvS9D5lBp1CbVXnsIfcdnp1EeEXb2h5LcTH/qbMQ4dqs kOEzkyG1KxENV+g/5Izrq0Um8Z+DoP4/ekGEY+Q1vQHV8LgW73nBRmc8q1g1HIe9ME 7yZKrXmJ0XGZPfQ7tBXWyBSAYMnwHaORR9lFGedQk1RZQHAn2iTprc6KF3Qwx6/ZGX YTVOLySNGaL+XKyJpiNlpUSnhVZrS6Bj1F4L4EueVSv+/0+3tX7J4D9d7yKyGKsheA xIiidQm13xgJA== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Ulf Magnusson , Sam Ravnborg , Linus Torvalds , Masahiro Yamada , Mauro Carvalho Chehab , Nicholas Piggin , Kate Stewart , Markus Heiser , linux-doc@vger.kernel.org, Borislav Petkov , linux-kernel@vger.kernel.org, Thomas Gleixner , Jonathan Corbet , Michal Marek , SeongJae Park , Greg Kroah-Hartman , Philippe Ombredanne , Max Filippov Subject: [PATCH 0/3] kbuild, kconfig: generate lexer/parser C files instead of copying _shipped files Date: Sun, 10 Dec 2017 01:02:27 +0900 Message-Id: <1512835350-8646-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In Linux build system convention, pre-generated files are version- controlled with a "_shipped" suffix. During the kernel building, they are simply shipped (copied) removing the suffix. >From users' point of view, this approach can reduce external tool dependency for the kernel build, >From developers point of view, it is tedious to manually regenerate such artifacts. In fact, we see several patches to regenerate _shipped files. They are noise commits. When we update a *.y or *.l file, it would be better to update the corresponding _shipped file in the same commit, but it is painful. If you use a different version of flex/bison, it will produce lots of irrelevant diffs. We could update _shipped files after adding various changes to the real sources, but it is not very nice for a git-bisect'ability. In case of a problem, "git bisect" would point to the commit updating _shipped files, but the root cause would be in another commit that has changed the corresponding .l or .y files. Some months ago, I sent RFC patches to run flex, bison, and gperf during the build. https://lkml.org/lkml/2017/8/19/49 Basically Linus agreed this, but he found a problem in gperf, then use of gperf in kernel was removed. It took some months for me to come back. This time, I installed various versions of flex/bison on my machine, and tested them more carefully. My current motivation is in Kconfig. There are several Kconfig patches touching *.y and *.l (and Linus suggested another improvement for Kconfig) so I want to remove zconf.lex.c_shipped and zconf.tab.c_shipped now. Kconfig has no problem for this switch. dtc and genksyms will be taken care of later because both of them are having shift/reduce conflicts now. The ambiguous grammar in dtc has been fixed in upstream, but not reflected to kernel yet. We can proceed migration in sub-system base. Masahiro Yamada (3): kbuild: add LEX and YACC variables kbuild: prepare to remove C files pre-generated by flex and bison kconfig: generate lexer and parser during build instead of shipping Documentation/process/changes.rst | 25 + Makefile | 4 +- scripts/Makefile.lib | 24 +- scripts/kconfig/Makefile | 1 + scripts/kconfig/zconf.lex.c_shipped | 2473 ----------------------------------- scripts/kconfig/zconf.tab.c_shipped | 2471 ---------------------------------- 6 files changed, 48 insertions(+), 4950 deletions(-) delete mode 100644 scripts/kconfig/zconf.lex.c_shipped delete mode 100644 scripts/kconfig/zconf.tab.c_shipped -- 2.7.4