diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2015-11-11 01:15:38 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-11-25 08:08:08 +0000 |
commit | 5056581b166b5ab61591557a655a647ba66332b3 (patch) | |
tree | 12b0776c6b874b331871d6bb3d29a905cae89429 /meta | |
parent | c54540e5f788a5bb27d3ff3cc47498ab2855b87d (diff) | |
download | poky-5056581b166b5ab61591557a655a647ba66332b3.tar.gz |
flex: fix test-bison-yylval and test-bison-yylloc failed
The tests in flex test-bison-yylval and test-bison-yylloc
failed, so we backport a patch from upstream to fix it.
(From OE-Core rev: 04810bf36720240cf0e1b8ba2cb1bba16b2ccac8)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/flex/files/0001-bison-test-fixes-Do-not-use-obsolete-bison-construct.patch | 80 | ||||
-rw-r--r-- | meta/recipes-devtools/flex/flex.inc | 1 |
2 files changed, 81 insertions, 0 deletions
diff --git a/meta/recipes-devtools/flex/files/0001-bison-test-fixes-Do-not-use-obsolete-bison-construct.patch b/meta/recipes-devtools/flex/files/0001-bison-test-fixes-Do-not-use-obsolete-bison-construct.patch new file mode 100644 index 0000000000..3504f546d3 --- /dev/null +++ b/meta/recipes-devtools/flex/files/0001-bison-test-fixes-Do-not-use-obsolete-bison-construct.patch | |||
@@ -0,0 +1,80 @@ | |||
1 | From 7fbc074901129ffaff9e18fadacae62d8053ad95 Mon Sep 17 00:00:00 2001 | ||
2 | From: Manoj Srivastava <srivasta@golden-gryphon.com> | ||
3 | Date: Wed, 9 Apr 2014 00:23:07 -0700 | ||
4 | Subject: [PATCH] Do not use obsolete bison constructs in tests. | ||
5 | |||
6 | In Bison 3.0, support for YYLEX_PARAM and YYPARSE_PARAM has been | ||
7 | removed (deprecated in Bison 1.875): use %lex-param, %parse-param, or | ||
8 | %param. This commit fixes the tests so they still work. | ||
9 | |||
10 | Signed-off-by: Manoj Srivastava <srivasta@golden-gryphon.com> | ||
11 | |||
12 | Upstream-Status: Backport [from http://sourceforge.net/p/flex/bugs/169/] | ||
13 | |||
14 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
15 | --- | ||
16 | tests/test-bison-yylloc/parser.y | 4 ++-- | ||
17 | tests/test-bison-yylval/parser.y | 4 ++-- | ||
18 | 2 files changed, 4 insertions(+), 4 deletions(-) | ||
19 | |||
20 | diff --git a/tests/test-bison-yylloc/parser.y b/tests/test-bison-yylloc/parser.y | ||
21 | index e8f4e56..224d252 100644 | ||
22 | --- a/tests/test-bison-yylloc/parser.y | ||
23 | +++ b/tests/test-bison-yylloc/parser.y | ||
24 | @@ -22,6 +22,7 @@ | ||
25 | */ | ||
26 | |||
27 | %parse-param { void* scanner } | ||
28 | +%lex-param { void* scanner } | ||
29 | |||
30 | /* | ||
31 | How to compile: | ||
32 | @@ -34,7 +35,6 @@ | ||
33 | #include "config.h" | ||
34 | |||
35 | #define YYERROR_VERBOSE 1 | ||
36 | -#define YYLEX_PARAM scanner | ||
37 | |||
38 | extern int testget_lineno(void*); | ||
39 | |||
40 | @@ -52,7 +52,7 @@ int process_text(char* s) { | ||
41 | |||
42 | %} | ||
43 | |||
44 | -%pure_parser | ||
45 | +%pure-parser | ||
46 | |||
47 | %union { | ||
48 | int lineno; | ||
49 | diff --git a/tests/test-bison-yylval/parser.y b/tests/test-bison-yylval/parser.y | ||
50 | index 0ffdb89..626c5e7 100644 | ||
51 | --- a/tests/test-bison-yylval/parser.y | ||
52 | +++ b/tests/test-bison-yylval/parser.y | ||
53 | @@ -26,6 +26,7 @@ | ||
54 | bison --defines --output-file="parser.c" --name-prefix="test" parser.y | ||
55 | */ | ||
56 | %parse-param { void* scanner } | ||
57 | +%lex-param { void* scanner } | ||
58 | %{ | ||
59 | #include <stdio.h> | ||
60 | #include <stdlib.h> | ||
61 | @@ -33,7 +34,6 @@ | ||
62 | #include "config.h" | ||
63 | |||
64 | #define YYERROR_VERBOSE 1 | ||
65 | -#define YYLEX_PARAM scanner | ||
66 | |||
67 | |||
68 | /* A dummy function. A check against seg-faults in yylval->str. */ | ||
69 | @@ -49,7 +49,7 @@ int process_text(char* s) { | ||
70 | |||
71 | %} | ||
72 | |||
73 | -%pure_parser | ||
74 | +%pure-parser | ||
75 | |||
76 | %union { | ||
77 | long unused; | ||
78 | -- | ||
79 | 1.9.1 | ||
80 | |||
diff --git a/meta/recipes-devtools/flex/flex.inc b/meta/recipes-devtools/flex/flex.inc index a4a26e2787..fbe921bfbe 100644 --- a/meta/recipes-devtools/flex/flex.inc +++ b/meta/recipes-devtools/flex/flex.inc | |||
@@ -8,6 +8,7 @@ LICENSE = "BSD" | |||
8 | DEPENDS += "${@'bison-native flex-native' if '${PTEST_ENABLED}' == '1' else ''}" | 8 | DEPENDS += "${@'bison-native flex-native' if '${PTEST_ENABLED}' == '1' else ''}" |
9 | 9 | ||
10 | SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 \ | 10 | SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 \ |
11 | file://0001-bison-test-fixes-Do-not-use-obsolete-bison-construct.patch \ | ||
11 | file://run-ptest \ | 12 | file://run-ptest \ |
12 | " | 13 | " |
13 | 14 | ||