[gnome-continuous-yocto/gnomeostree-3.28-rocko: 4774/8267] acpica: work around flex 2.6.2 code generation issue
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 4774/8267] acpica: work around flex 2.6.2 code generation issue
- Date: Sun, 17 Dec 2017 02:30:30 +0000 (UTC)
commit 7a309065c169cead5563701ef8e9298bcff44d1d
Author: Patrick Ohly <patrick ohly intel com>
Date: Fri Jan 20 14:26:59 2017 +0100
acpica: work around flex 2.6.2 code generation issue
Without this patch, linking fails with a missing implementation of
yy_scan_string. This looks like a regression in flex, because 2.6.0 generated
different code that called PrParser_scan_string
resp. DtParser_scan_string.
Working around that in acpica until this is better understood or fixed
in flex is the easiest solution for now.
(From OE-Core rev: 8f2ace5e1b396ad97b8e9cc88e7bb773d18acd21)
Signed-off-by: Patrick Ohly <patrick ohly intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/recipes-extended/acpica/acpica_20150515.bb | 1 +
.../files/rename-yy_scan_string-manually.patch | 64 ++++++++++++++++++++
2 files changed, 65 insertions(+), 0 deletions(-)
---
diff --git a/meta/recipes-extended/acpica/acpica_20150515.bb b/meta/recipes-extended/acpica/acpica_20150515.bb
index de897e1..c23b491 100644
--- a/meta/recipes-extended/acpica/acpica_20150515.bb
+++ b/meta/recipes-extended/acpica/acpica_20150515.bb
@@ -18,6 +18,7 @@ DEPENDS = "bison flex"
SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz \
file://no-werror.patch \
+ file://rename-yy_scan_string-manually.patch \
"
SRC_URI[md5sum] = "2bc4a7ccc82de9df9fa964f784ecb29c"
SRC_URI[sha256sum] = "61204ec56d71bc9bfa2ee2ade4c66f7e8541772ac72ef8ccc20b3f339cc96374"
diff --git a/meta/recipes-extended/acpica/files/rename-yy_scan_string-manually.patch
b/meta/recipes-extended/acpica/files/rename-yy_scan_string-manually.patch
new file mode 100644
index 0000000..b62ca25
--- /dev/null
+++ b/meta/recipes-extended/acpica/files/rename-yy_scan_string-manually.patch
@@ -0,0 +1,64 @@
+From 2ab61e6ad5a9cfcde838379bc36babfaaa61afb8 Mon Sep 17 00:00:00 2001
+From: Patrick Ohly <patrick ohly intel com>
+Date: Fri, 20 Jan 2017 13:50:17 +0100
+Subject: [PATCH] rename yy_scan_string manually
+
+flex 2.6.0 used to generate code where yy_scan_string was mapped
+to <custom prefix>_scan_string directly in the generated .c code.
+
+For example, generate/unix/iasl/obj/prparserlex.c:
+
+int
+PrInitLexer (
+ char *String)
+{
+
+ LexBuffer = PrParser_scan_string (String);
+ return (LexBuffer == NULL);
+}
+
+flex 2.6.3 no longer does that, leading to a compiler warning
+and link error about yy_scan_string().
+
+Both versions generate a preamble in the beginning of prparserlex.c
+that maps several yy_* names, but yy_scan_string is not among those:
+
+...
+...
+
+Upstream-Status: Inappropriate [workaround for https://github.com/westes/flex/issues/164]
+Signed-off-by: Patrick Ohly <patrick ohly intel com>
+---
+ source/compiler/dtparser.l | 2 +-
+ source/compiler/prparser.l | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/source/compiler/dtparser.l b/source/compiler/dtparser.l
+index 3f4c2f3..eaa43ff 100644
+--- a/source/compiler/dtparser.l
++++ b/source/compiler/dtparser.l
+@@ -120,7 +120,7 @@ DtInitLexer (
+ char *String)
+ {
+
+- LexBuffer = yy_scan_string (String);
++ LexBuffer = DtParser_scan_string (String);
+ return (LexBuffer == NULL);
+ }
+
+diff --git a/source/compiler/prparser.l b/source/compiler/prparser.l
+index 10bd130..9cb3573 100644
+--- a/source/compiler/prparser.l
++++ b/source/compiler/prparser.l
+@@ -127,7 +127,7 @@ PrInitLexer (
+ char *String)
+ {
+
+- LexBuffer = yy_scan_string (String);
++ LexBuffer = PrParser_scan_string (String);
+ return (LexBuffer == NULL);
+ }
+
+--
+2.11.0
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]