flex: upgrade to 2.6.2
PATCH 1/1 flex: upgrade to 2.6.2
Patches dropped as they are merged upstream:
- CVE-2016-6354.patch
- 0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
- do_not_create_pdf_doc.patch
Apply a patch from github to simplify cross-compilation and not need a flex-native to bootstrap.
---
...oid-c-comments-in-c-code-fails-with-gcc-6.patch | 64 ------
.../recipes-devtools/flex/flex/CVE-2016-6354.patch | 59 ------
meta/recipes-devtools/flex/flex/crosscompile.patch | 214 +++++++++++++++++++++
.../flex/flex/do_not_create_pdf_doc.patch | 17 --
.../flex/{flex_2.6.0.bb => flex_2.6.2.bb} | 11 +-
5 files changed, 219 insertions(+), 146 deletions(-)
delete mode 100644 meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
delete mode 100644 meta/recipes-devtools/flex/flex/CVE-2016-6354.patch
create mode 100644 meta/recipes-devtools/flex/flex/crosscompile.patch
delete mode 100644 meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
rename meta/recipes-devtools/flex/{flex_2.6.0.bb => flex_2.6.2.bb} (84%)meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch deleted +0 -64
@@ -1,64 +0,0 @@ -From 7072befe1397af4eb01c3ff7edf99f0cd5076089 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= <[email protected]> -Date: Tue, 30 Aug 2016 14:25:32 +0200 -Subject: [PATCH] avoid c++ comments in c-code - fails with gcc-6 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -fixes: - -| error: C++ style comments are not allowed in ISO C90 -| num_to_alloc = 1; // After all that talk, this was set to 1 anyways... - -Upstream-Status: Pending - -Signed-off-by: Andreas Müller <[email protected]> ---- - src/flex.skl | 2 +- - src/scan.c | 2 +- - src/skel.c | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/flex.skl b/src/flex.skl -index 73a0b9e..ed71627 100644 ---- a/src/flex.skl -+++ b/src/flex.skl -@@ -2350,7 +2350,7 @@ void yyFlexLexer::yyensure_buffer_stack(void) - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ -- num_to_alloc = 1; // After all that talk, this was set to 1 anyways... -+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - M4_YY_CALL_LAST_ARG); -diff --git a/src/scan.c b/src/scan.c -index b55df2d..f1dce75 100644 ---- a/src/scan.c -+++ b/src/scan.c -@@ -4672,7 +4672,7 @@ static void yyensure_buffer_stack (void) - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ -- num_to_alloc = 1; // After all that talk, this was set to 1 anyways... -+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways...*/ - (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - ); -diff --git a/src/skel.c b/src/skel.c -index ef657d3..26cc889 100644 ---- a/src/skel.c -+++ b/src/skel.c -@@ -2561,7 +2561,7 @@ const char *skel[] = { - " * scanner will even need a stack. We use 2 instead of 1 to avoid an", - " * immediate realloc on the next call.", - " */", -- " num_to_alloc = 1; // After all that talk, this was set to 1 anyways...", -+ " num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */", - " YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc", - " (num_to_alloc * sizeof(struct yy_buffer_state*)", - " M4_YY_CALL_LAST_ARG);", --- -2.5.5 -
meta/recipes-devtools/flex/flex/CVE-2016-6354.patch deleted +0 -59
59 lines not on this page · raw message
meta/recipes-devtools/flex/flex/crosscompile.patch new file +214 -0
214 lines not on this page · raw message
meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch deleted +0 -17
@@ -1,17 +0,0 @@ -Upstream-Status: Inappropriate (embedded specific) - -Signed-off-by: Laurentiu Palcu <[email protected]> - -Index: flex-2.5.37/doc/Makefile.am -=================================================================== ---- flex-2.5.37.orig/doc/Makefile.am 2012-07-21 04:18:27.000000000 +0300 -+++ flex-2.5.37/doc/Makefile.am 2013-07-30 17:57:09.834834531 +0300 -@@ -2,7 +2,7 @@ - - info_TEXINFOS = flex.texi - dist_man_MANS = flex.1 --dist_doc_DATA= flex.pdf -+EXTRA_DIST= flex.pdf - - CLEANFILES = \ - flex.hks \
meta/recipes-devtools/flex/flex_2.6.2.bb renamed from meta/recipes-devtools/flex/flex_2.6.0.bb +5 -6
@@ -6,21 +6,20 @@ SECTION = "devel" LICENSE = "BSD" DEPENDS = "${@bb.utils.contains('PTEST_ENABLED', '1', 'bison-native flex-native', '', d)}" + BBCLASSEXTEND = "native nativesdk" LIC_FILES_CHKSUM = "file://COPYING;md5=e4742cf92e89040b39486a6219b68067" -SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 \ +SRC_URI = "https://github.com/westes/flex/releases/download/v${PV}/flex-${PV}.tar.gz \ + file://crosscompile.patch;apply=1 \ file://run-ptest \ - file://do_not_create_pdf_doc.patch \ file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \ - file://0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch \ - file://CVE-2016-6354.patch \ ${@bb.utils.contains('PTEST_ENABLED', '1', '', 'file://disable-tests.patch', d)} \ " -SRC_URI[md5sum] = "266270f13c48ed043d95648075084d59" -SRC_URI[sha256sum] = "24e611ef5a4703a191012f80c1027dc9d12555183ce0ecd46f3636e587e9b8e9" +SRC_URI[md5sum] = "cc6d76c333db7653d5caf423a3335239" +SRC_URI[sha256sum] = "9a01437a1155c799b7dc2508620564ef806ba66250c36bf5f9034b1c207cb2c9" # Flex has moved to github from 2.6.1 onwards UPSTREAM_CHECK_URI = "https://github.com/westes/flex/releases"
Signature · 1 line
2.8.1
Quoted 7 lines · Ross Burton
Patches dropped as they are merged upstream:
- CVE-2016-6354.patch
- 0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
- do_not_create_pdf_doc.patchApply a patch from github to simplify cross-compilation and not need a flex-native to bootstrap.
After rebasing my pending "UEFI/OVMF" patches I noticed that this particular version update breaks compilation of acpica-native:
| obj/dtparserlex.o: In function `DtInitLexer': | dtparserlex.c:(.text+0x10e7): undefined reference to `yy_scan_string' | obj/prparserlex.o: In function `PrInitLexer': | prparserlex.c:(.text+0x1327): undefined reference to `yy_scan_string' | collect2: error: ld returned 1 exit status | ../Makefile.rules:14: recipe for target 'obj/iasl' failed | make[1]: *** [obj/iasl] Error 1 | make[1]: Leaving directory '/fast/build/refkit/intel-corei7-64/tmp-glibc/work/x86_64-linux/acpica-native/20161222-r0/acpica-unix2-20161222/generate/unix/iasl' | generate/unix/Makefile.common:25: recipe for target 'iasl' failed | make: *** [iasl] Error 2 | WARNING: exit code 1 from a shell command. | ERROR: Function failed: do_compile (log file is located
at /fast/build/refkit/intel-corei7-64/tmp-glibc/work/x86_64-linux/acpica-native/20161222-r0/temp/log.do_compile.32470)
That still occurs also after updating to the latest upstream acpica.
I searched for the error and found this about yy_scan_string:
In case anyone else is getting symbol is not defined or other such errors when trying this: remember to include %option reentrant in the lexer file.
http://stackoverflow.com/questions/1907847/how-to-use-yy-scan-string-in-lex?ref=driverlayer.com/web
I tried that and then just got different compile errors.
Perhaps someone with more knowledge about flex can provide some guidance?
Fathi, is that something that you or upstream have come across?
Ross, would it be possible to revert this patch so that the UEFI patches can be merged? Obviously the problem still needs to be resolved.
Signature · 6 lines
Best Regards, Patrick Ohly The content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter.
Quoted 4 lines · Patrick Ohly
Perhaps someone with more knowledge about flex can provide some guidance?
Fathi, is that something that you or upstream have come across?
After looking into this some more I've come to the conclusion that this looks like a bug in flex, so I have filed
https://github.com/westes/flex/issues/164
I also have a workaround for acpica, which I am going to add to V3 of the UEFI/OVMF patch series.
Signature · 6 lines
Best Regards, Patrick Ohly The content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter.