diff options
| author | Patrick Ohly <patrick.ohly@intel.com> | 2017-01-20 14:26:59 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-01 11:17:44 +0000 |
| commit | 7a309065c169cead5563701ef8e9298bcff44d1d (patch) | |
| tree | 88566210aee20ffc67a2c8486070bab3335b5e65 | |
| parent | 94f684e4f468dfe3598f403c8fb3cdb38509eb96 (diff) | |
| download | poky-7a309065c169cead5563701ef8e9298bcff44d1d.tar.gz | |
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>
| -rw-r--r-- | meta/recipes-extended/acpica/acpica_20150515.bb | 1 | ||||
| -rw-r--r-- | meta/recipes-extended/acpica/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 de897e1917..c23b4910d2 100644 --- a/meta/recipes-extended/acpica/acpica_20150515.bb +++ b/meta/recipes-extended/acpica/acpica_20150515.bb | |||
| @@ -18,6 +18,7 @@ DEPENDS = "bison flex" | |||
| 18 | 18 | ||
| 19 | SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz \ | 19 | SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz \ |
| 20 | file://no-werror.patch \ | 20 | file://no-werror.patch \ |
| 21 | file://rename-yy_scan_string-manually.patch \ | ||
| 21 | " | 22 | " |
| 22 | SRC_URI[md5sum] = "2bc4a7ccc82de9df9fa964f784ecb29c" | 23 | SRC_URI[md5sum] = "2bc4a7ccc82de9df9fa964f784ecb29c" |
| 23 | SRC_URI[sha256sum] = "61204ec56d71bc9bfa2ee2ade4c66f7e8541772ac72ef8ccc20b3f339cc96374" | 24 | 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 0000000000..b62ca25ba2 --- /dev/null +++ b/meta/recipes-extended/acpica/files/rename-yy_scan_string-manually.patch | |||
| @@ -0,0 +1,64 @@ | |||
| 1 | From 2ab61e6ad5a9cfcde838379bc36babfaaa61afb8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Patrick Ohly <patrick.ohly@intel.com> | ||
| 3 | Date: Fri, 20 Jan 2017 13:50:17 +0100 | ||
| 4 | Subject: [PATCH] rename yy_scan_string manually | ||
| 5 | |||
| 6 | flex 2.6.0 used to generate code where yy_scan_string was mapped | ||
| 7 | to <custom prefix>_scan_string directly in the generated .c code. | ||
| 8 | |||
| 9 | For example, generate/unix/iasl/obj/prparserlex.c: | ||
| 10 | |||
| 11 | int | ||
| 12 | PrInitLexer ( | ||
| 13 | char *String) | ||
| 14 | { | ||
| 15 | |||
| 16 | LexBuffer = PrParser_scan_string (String); | ||
| 17 | return (LexBuffer == NULL); | ||
| 18 | } | ||
| 19 | |||
| 20 | flex 2.6.3 no longer does that, leading to a compiler warning | ||
| 21 | and link error about yy_scan_string(). | ||
| 22 | |||
| 23 | Both versions generate a preamble in the beginning of prparserlex.c | ||
| 24 | that maps several yy_* names, but yy_scan_string is not among those: | ||
| 25 | |||
| 26 | ... | ||
| 27 | ... | ||
| 28 | |||
| 29 | Upstream-Status: Inappropriate [workaround for https://github.com/westes/flex/issues/164] | ||
| 30 | Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> | ||
| 31 | --- | ||
| 32 | source/compiler/dtparser.l | 2 +- | ||
| 33 | source/compiler/prparser.l | 2 +- | ||
| 34 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
| 35 | |||
| 36 | diff --git a/source/compiler/dtparser.l b/source/compiler/dtparser.l | ||
| 37 | index 3f4c2f3..eaa43ff 100644 | ||
| 38 | --- a/source/compiler/dtparser.l | ||
| 39 | +++ b/source/compiler/dtparser.l | ||
| 40 | @@ -120,7 +120,7 @@ DtInitLexer ( | ||
| 41 | char *String) | ||
| 42 | { | ||
| 43 | |||
| 44 | - LexBuffer = yy_scan_string (String); | ||
| 45 | + LexBuffer = DtParser_scan_string (String); | ||
| 46 | return (LexBuffer == NULL); | ||
| 47 | } | ||
| 48 | |||
| 49 | diff --git a/source/compiler/prparser.l b/source/compiler/prparser.l | ||
| 50 | index 10bd130..9cb3573 100644 | ||
| 51 | --- a/source/compiler/prparser.l | ||
| 52 | +++ b/source/compiler/prparser.l | ||
| 53 | @@ -127,7 +127,7 @@ PrInitLexer ( | ||
| 54 | char *String) | ||
| 55 | { | ||
| 56 | |||
| 57 | - LexBuffer = yy_scan_string (String); | ||
| 58 | + LexBuffer = PrParser_scan_string (String); | ||
| 59 | return (LexBuffer == NULL); | ||
| 60 | } | ||
| 61 | |||
| 62 | -- | ||
| 63 | 2.11.0 | ||
| 64 | |||
