diff options
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 | ||