summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch64
-rw-r--r--meta/recipes-devtools/flex/flex_2.6.0.bb1
2 files changed, 65 insertions, 0 deletions
diff --git a/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch b/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
new file mode 100644
index 0000000000..438ca5f527
--- /dev/null
+++ b/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
@@ -0,0 +1,64 @@
1From 7072befe1397af4eb01c3ff7edf99f0cd5076089 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
3Date: Tue, 30 Aug 2016 14:25:32 +0200
4Subject: [PATCH] avoid c++ comments in c-code - fails with gcc-6
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9fixes:
10
11| error: C++ style comments are not allowed in ISO C90
12| num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
13
14Upstream-Status: Pending
15
16Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
17---
18 src/flex.skl | 2 +-
19 src/scan.c | 2 +-
20 src/skel.c | 2 +-
21 3 files changed, 3 insertions(+), 3 deletions(-)
22
23diff --git a/src/flex.skl b/src/flex.skl
24index 73a0b9e..ed71627 100644
25--- a/src/flex.skl
26+++ b/src/flex.skl
27@@ -2350,7 +2350,7 @@ void yyFlexLexer::yyensure_buffer_stack(void)
28 * scanner will even need a stack. We use 2 instead of 1 to avoid an
29 * immediate realloc on the next call.
30 */
31- num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
32+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
33 YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
34 (num_to_alloc * sizeof(struct yy_buffer_state*)
35 M4_YY_CALL_LAST_ARG);
36diff --git a/src/scan.c b/src/scan.c
37index b55df2d..f1dce75 100644
38--- a/src/scan.c
39+++ b/src/scan.c
40@@ -4672,7 +4672,7 @@ static void yyensure_buffer_stack (void)
41 * scanner will even need a stack. We use 2 instead of 1 to avoid an
42 * immediate realloc on the next call.
43 */
44- num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
45+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways...*/
46 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
47 (num_to_alloc * sizeof(struct yy_buffer_state*)
48 );
49diff --git a/src/skel.c b/src/skel.c
50index ef657d3..26cc889 100644
51--- a/src/skel.c
52+++ b/src/skel.c
53@@ -2561,7 +2561,7 @@ const char *skel[] = {
54 " * scanner will even need a stack. We use 2 instead of 1 to avoid an",
55 " * immediate realloc on the next call.",
56 " */",
57- " num_to_alloc = 1; // After all that talk, this was set to 1 anyways...",
58+ " num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */",
59 " YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc",
60 " (num_to_alloc * sizeof(struct yy_buffer_state*)",
61 " M4_YY_CALL_LAST_ARG);",
62--
632.5.5
64
diff --git a/meta/recipes-devtools/flex/flex_2.6.0.bb b/meta/recipes-devtools/flex/flex_2.6.0.bb
index f6d136c93e..db2cf1c6d4 100644
--- a/meta/recipes-devtools/flex/flex_2.6.0.bb
+++ b/meta/recipes-devtools/flex/flex_2.6.0.bb
@@ -14,6 +14,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 \
14 file://run-ptest \ 14 file://run-ptest \
15 file://do_not_create_pdf_doc.patch \ 15 file://do_not_create_pdf_doc.patch \
16 file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \ 16 file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
17 file://0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch \
17 ${@bb.utils.contains('PTEST_ENABLED', '1', '', 'file://disable-tests.patch', d)} \ 18 ${@bb.utils.contains('PTEST_ENABLED', '1', '', 'file://disable-tests.patch', d)} \
18 " 19 "
19 20