summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2015-11-11 01:15:38 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-11-25 08:08:08 +0000
commit5056581b166b5ab61591557a655a647ba66332b3 (patch)
tree12b0776c6b874b331871d6bb3d29a905cae89429 /meta
parentc54540e5f788a5bb27d3ff3cc47498ab2855b87d (diff)
downloadpoky-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.patch80
-rw-r--r--meta/recipes-devtools/flex/flex.inc1
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 @@
1From 7fbc074901129ffaff9e18fadacae62d8053ad95 Mon Sep 17 00:00:00 2001
2From: Manoj Srivastava <srivasta@golden-gryphon.com>
3Date: Wed, 9 Apr 2014 00:23:07 -0700
4Subject: [PATCH] Do not use obsolete bison constructs in tests.
5
6In Bison 3.0, support for YYLEX_PARAM and YYPARSE_PARAM has been
7removed (deprecated in Bison 1.875): use %lex-param, %parse-param, or
8%param. This commit fixes the tests so they still work.
9
10Signed-off-by: Manoj Srivastava <srivasta@golden-gryphon.com>
11
12Upstream-Status: Backport [from http://sourceforge.net/p/flex/bugs/169/]
13
14Signed-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
20diff --git a/tests/test-bison-yylloc/parser.y b/tests/test-bison-yylloc/parser.y
21index 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;
49diff --git a/tests/test-bison-yylval/parser.y b/tests/test-bison-yylval/parser.y
50index 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--
791.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"
8DEPENDS += "${@'bison-native flex-native' if '${PTEST_ENABLED}' == '1' else ''}" 8DEPENDS += "${@'bison-native flex-native' if '${PTEST_ENABLED}' == '1' else ''}"
9 9
10SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 \ 10SRC_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