linux/Documentation/process
Masahiro Yamada 033dba2ec0 kbuild: prepare to remove C files pre-generated by flex and bison
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.

This approach can reduce external tool dependency for the kernel build,
but it is tedious to manually regenerate such artifacts from developers'
point of view.  (We need to do "make REGENERATE_PARSERS=1" every time
we touch real source files such as *.l, *.y)

Some months ago, I sent out RFC patches to run flex, bison, and gperf
during the build.

In the review and test, Linus noticed gperf-3.1 had changed the lookup
function prototype.  Then, the use of gperf in kernel was entirely
removed by commit bb3290d916 ("Remove gperf usage from toolchain").

This time, I tested several versions of flex and bison, and I was not
hit by any compatibility issue except a flaw in flex-2.6.3; if you
generate lexer for dtc and genksyms with flex-2.6.3, you will see
"yywrap redefined" warning.  This was not intentional, but a bug,
fixed by flex-2.6.4.  Otherwise, both flex and bison look fairly
stable for a long time.

This commit prepares some build rules to remove the _shipped files.
Also, document minimal requirement for flex and bison.

Rationale for the minimal version:
The -Wmissing-prototypes option of GCC warns "no previous prototype"
for lexers generated by flex-2.5.34 or older, so I chose 2.5.35 as the
required version for flex.  Flex-2.5.35 was released in 2008.  Bison
looks more stable.  I did not see any problem with bison-2.0, released
in 2004.  I did not test bison-1.x, but bison-2.0 should be old enough.

Tested flex versions:
  2.5.35
  2.5.36
  2.5.37
  2.5.39
  2.6.0
  2.6.1
  2.6.2
  2.6.3   (*)
  2.6.4

 (*) flex-2.6.3 causes "yywrap redefined" warning

Tested bison versions:
  2.0
  2.1
  2.2
  2.3
  2.4
  2.4.1
  2.5.1
  2.6
  2.6.1
  2.6.2
  2.6.3
  2.6.4
  2.6.5
  2.7
  2.7.1
  3.0
  3.0.1
  3.0.2
  3.0.3
  3.0.4

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-12-16 11:12:53 +09:00
..
1.Intro.rst Doc: Correct typo, "Introdution" => "Introduction" 2016-12-01 10:44:08 -07:00
2.Process.rst
3.Early-stage.rst Documentation/process: phrasofix 2017-09-26 14:53:51 -06:00
4.Coding.rst Documentation: fix ref to coccinelle content 2017-10-19 12:57:35 -06:00
5.Posting.rst Documentation/process: add Co-Developed-by: tag for patches with multiple authors 2017-11-20 10:43:06 -07:00
6.Followthrough.rst
7.AdvancedTopics.rst
8.Conclusion.rst docs: fix locations of several documents that got moved 2016-10-24 08:12:35 -02:00
adding-syscalls.rst docs: fix locations of several documents that got moved 2016-10-24 08:12:35 -02:00
applying-patches.rst docs: process: drop git snapshots from applying-patches.rst 2017-08-30 15:25:30 -06:00
changes.rst kbuild: prepare to remove C files pre-generated by flex and bison 2017-12-16 11:12:53 +09:00
code-of-conflict.rst
coding-style.rst Doc: fix a markup error in coding-style.rst 2017-06-05 16:12:08 -06:00
conf.py
development-process.rst
email-clients.rst doc: Document suitability of IBM Verse for kernel development 2017-06-22 10:22:41 -06:00
howto.rst docs: update old references for DocBook from the documentation 2017-05-16 08:44:19 -03:00
index.rst A relatively calm cycle for the docs tree again. 2017-11-13 08:25:06 -08:00
kernel-docs.rst docs: update old references for DocBook from the documentation 2017-05-16 08:44:19 -03:00
kernel-driver-statement.rst Documentation: add Kernel Driver Statement to the kernel 2017-10-07 10:05:56 -06:00
kernel-enforcement-statement.rst Documentation: Add Frank Rowand to list of enforcement statement endorsers 2017-11-04 11:52:39 +01:00
magic-number.rst
management-style.rst docs: fix locations of several documents that got moved 2016-10-24 08:12:35 -02:00
stable-api-nonsense.rst
stable-kernel-rules.rst Documentation: stable-kernel-rules: fix broken git urls 2017-08-24 13:39:47 -06:00
submit-checklist.rst docs: fix locations of several documents that got moved 2016-10-24 08:12:35 -02:00
submitting-drivers.rst Documentation: fix driver-api doc refs 2017-10-12 11:12:29 -06:00
submitting-patches.rst Documentation/process: fix the canonical patch format description 2017-09-26 14:53:29 -06:00
volatile-considered-harmful.rst Documentation/atomic_ops.txt: convert to ReST markup 2016-11-30 17:40:52 -07:00