All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Ohly <patrick.ohly@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH v5 02/12] acpica: work around flex 2.6.2 code generation issue
Date: Fri, 27 Jan 2017 16:30:32 +0100	[thread overview]
Message-ID: <ef36ec5c696cc690af21e560c82924e5dab51a1e.1485530988.git-series.patrick.ohly@intel.com> (raw)
In-Reply-To: <cover.51e0eb88ea69468cf5a410aa7194c25cf61d57b7.1485530988.git-series.patrick.ohly@intel.com>

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.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 meta/recipes-extended/acpica/acpica_20150515.bb                         |  1 +
 meta/recipes-extended/acpica/files/rename-yy_scan_string-manually.patch | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 meta/recipes-extended/acpica/files/rename-yy_scan_string-manually.patch

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
+
-- 
git-series 0.9.1


  parent reply	other threads:[~2017-01-27 15:30 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27 15:30 [PATCH v5 00/12] UEFI + Secure Boot + qemu Patrick Ohly
2017-01-27 15:30 ` [PATCH v5 01/12] acpica: move from meta-oe to OE-core Patrick Ohly
2017-02-17 21:13   ` Richard Purdie
2017-02-18  2:02     ` Khem Raj
2017-02-18  8:03     ` Patrick Ohly
2017-01-27 15:30 ` Patrick Ohly [this message]
2017-01-27 15:30 ` [PATCH v5 03/12] ovmf: move from meta-luv " Patrick Ohly
2017-02-17 21:10   ` Richard Purdie
2017-02-18  2:04     ` Khem Raj
2017-02-23 17:47       ` Patrick Ohly
2017-02-23 17:48         ` [PATCH 1/2] acpica: fix compilation with musl Patrick Ohly
2017-02-23 17:48           ` [PATCH 2/2] ovmf: increase path length limit Patrick Ohly
2017-02-24  0:57             ` Patrick Ohly
2017-02-24  0:58               ` [PATCH v2] " Patrick Ohly
2017-02-18  8:05     ` [PATCH v5 03/12] ovmf: move from meta-luv to OE-core Patrick Ohly
2017-01-27 15:30 ` [PATCH v5 04/12] ovmf: explicitly depend on nasm-native Patrick Ohly
2017-01-27 15:30 ` [PATCH v5 05/12] ovmf: deploy firmware in image directory Patrick Ohly
2017-01-27 15:30 ` [PATCH v5 06/12] ovmf_git.bb: enable parallel compilation Patrick Ohly
2017-01-27 15:30 ` [PATCH v5 07/12] ovmf_git.bb: enable Secure Boot Patrick Ohly
2017-01-27 15:30 ` [PATCH v5 08/12] runqemu: fix undefined variable reference in check_arg_path() Patrick Ohly
2017-01-27 15:30 ` [PATCH v5 09/12] runqemu: also accept -image suffix for rootfs parameter Patrick Ohly
2017-01-27 16:54   ` Bystricky, Juro
2017-01-27 19:22     ` Patrick Ohly
2017-01-30 17:12       ` Bystricky, Juro
2017-01-30 19:10         ` Patrick Ohly
2017-01-27 15:30 ` [PATCH v5 10/12] runqemu: support UEFI with OVMF firmware Patrick Ohly
2017-01-27 15:30 ` [PATCH v5 11/12] ovmf: build image which enrolls standard keys Patrick Ohly
2017-01-27 15:30 ` [PATCH v5 12/12] ovmf: remove BGRT patch Patrick Ohly
2017-01-27 15:53 ` ✗ patchtest: failure for UEFI + Secure Boot + qemu (rev6) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ef36ec5c696cc690af21e560c82924e5dab51a1e.1485530988.git-series.patrick.ohly@intel.com \
    --to=patrick.ohly@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.