mirror of
https://git.yoctoproject.org/poky
synced 2026-05-02 18:32:15 +02:00
acpica: upgrade to 20190215
Drop yy_scan_string patch, this only affects builds with flex 2.6.2. We
currently have 2.6.0 and when we upgrade it will be to at least 2.6.3, which
fixes the regression.
Drop manipulate_fds_instead-of-FILE.patch, the original problem was fix upstream
in May 2015[1] so the 20170303 upgrade should have dropped this patch instead of
rebasing.
Call the upstream install target with variables set appropriately, instead of
hand-coding an install.
[1] ecb91f4c3a
(From OE-Core rev: 4e95571120c8748b2b5ef4b6a06914232b19d457)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
7f7a7cba4d
commit
218ce6a595
@@ -16,12 +16,9 @@ COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux"
|
||||
|
||||
DEPENDS = "bison flex bison-native"
|
||||
|
||||
SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz \
|
||||
file://rename-yy_scan_string-manually.patch \
|
||||
file://manipulate-fds-instead-of-FILE.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "31691e2eb82b2064f78536a3423c18d6"
|
||||
SRC_URI[sha256sum] = "5d8fc9d9db9e04830d40bec9add04b21c05d466e0187d354815006fdd823cf15"
|
||||
SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz"
|
||||
SRC_URI[md5sum] = "0ea9047bf15dfdf3583f5266cc6da718"
|
||||
SRC_URI[sha256sum] = "8f939ad6130862e05853837496500b3fb93037530e5ea0ca0298458522ffc2c7"
|
||||
UPSTREAM_CHECK_URI = "https://acpica.org/downloads"
|
||||
|
||||
S = "${WORKDIR}/acpica-unix2-${PV}"
|
||||
@@ -31,16 +28,16 @@ inherit update-alternatives
|
||||
ALTERNATIVE_PRIORITY = "100"
|
||||
ALTERNATIVE_${PN} = "acpixtract"
|
||||
|
||||
EXTRA_OEMAKE = "CC='${CC}' 'OPT_CFLAGS=-Wall'"
|
||||
EXTRA_OEMAKE = "CC='${CC}' \
|
||||
OPT_CFLAGS=-Wall \
|
||||
DESTDIR=${D} \
|
||||
PREFIX=${prefix} \
|
||||
INSTALLDIR=${bindir} \
|
||||
INSTALLFLAGS= \
|
||||
"
|
||||
|
||||
do_install() {
|
||||
install -D -p -m0755 generate/unix/bin*/iasl ${D}${bindir}/iasl
|
||||
install -D -p -m0755 generate/unix/bin*/acpibin ${D}${bindir}/acpibin
|
||||
install -D -p -m0755 generate/unix/bin*/acpiexec ${D}${bindir}/acpiexec
|
||||
install -D -p -m0755 generate/unix/bin*/acpihelp ${D}${bindir}/acpihelp
|
||||
install -D -p -m0755 generate/unix/bin*/acpinames ${D}${bindir}/acpinames
|
||||
install -D -p -m0755 generate/unix/bin*/acpisrc ${D}${bindir}/acpisrc
|
||||
install -D -p -m0755 generate/unix/bin*/acpixtract ${D}${bindir}/acpixtract
|
||||
oe_runmake install
|
||||
}
|
||||
|
||||
# iasl*.bb is a subset of this recipe, so RREPLACE it
|
||||
@@ -1,71 +0,0 @@
|
||||
From 540d80469e6a7dce6baf7214df90e86daffc5175 Mon Sep 17 00:00:00 2001
|
||||
From: Fan Xin <fan.xin@jp.fujitsu.com>
|
||||
Date: Mon, 5 Jun 2017 13:26:38 +0900
|
||||
Subject: [PATCH] aslfiles.c: manipulate fds instead of FILE
|
||||
|
||||
Copying what stdout/stderr point to is not portable and fails with
|
||||
musl because FILE is an undefined struct.
|
||||
|
||||
Instead, use lower-level Unix functions to modify the file that stderr
|
||||
writes into. This works on the platforms that Yocto targets.
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
||||
|
||||
Rebase on acpica 20170303
|
||||
|
||||
Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
|
||||
|
||||
---
|
||||
source/compiler/aslfiles.c | 15 ++++++++++++---
|
||||
1 file changed, 12 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/source/compiler/aslfiles.c b/source/compiler/aslfiles.c
|
||||
index 82865db..cc072dc 100644
|
||||
--- a/source/compiler/aslfiles.c
|
||||
+++ b/source/compiler/aslfiles.c
|
||||
@@ -43,6 +43,11 @@
|
||||
|
||||
#include "aslcompiler.h"
|
||||
#include "acapps.h"
|
||||
+#include "dtcompiler.h"
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/stat.h>
|
||||
+#include <fcntl.h>
|
||||
+#include <unistd.h>
|
||||
|
||||
#define _COMPONENT ACPI_COMPILER
|
||||
ACPI_MODULE_NAME ("aslfiles")
|
||||
@@ -606,6 +611,8 @@ FlOpenMiscOutputFiles (
|
||||
|
||||
if (Gbl_DebugFlag)
|
||||
{
|
||||
+ int fd;
|
||||
+
|
||||
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_DEBUG);
|
||||
if (!Filename)
|
||||
{
|
||||
@@ -617,10 +624,10 @@ FlOpenMiscOutputFiles (
|
||||
/* Open the debug file as STDERR, text mode */
|
||||
|
||||
Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Filename = Filename;
|
||||
- Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle =
|
||||
- freopen (Filename, "w+t", stderr);
|
||||
|
||||
- if (!Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle)
|
||||
+ fd = open(Filename, O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
|
||||
+ if (fd < 0 ||
|
||||
+ dup2(fd, fileno(stderr)))
|
||||
{
|
||||
/*
|
||||
* A problem with freopen is that on error, we no longer
|
||||
@@ -634,6 +641,8 @@ FlOpenMiscOutputFiles (
|
||||
exit (1);
|
||||
}
|
||||
|
||||
+ Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle = stderr;
|
||||
+
|
||||
AslCompilerSignon (ASL_FILE_DEBUG_OUTPUT);
|
||||
AslCompilerFileHeader (ASL_FILE_DEBUG_OUTPUT);
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user