diff options
Diffstat (limited to 'poky/meta/recipes-extended/acpica/files')
3 files changed, 167 insertions, 0 deletions
diff --git a/poky/meta/recipes-extended/acpica/files/0001-Linux-add-support-for-X32-ABI-compilation.patch b/poky/meta/recipes-extended/acpica/files/0001-Linux-add-support-for-X32-ABI-compilation.patch new file mode 100644 index 000000000..df7420006 --- /dev/null +++ b/poky/meta/recipes-extended/acpica/files/0001-Linux-add-support-for-X32-ABI-compilation.patch @@ -0,0 +1,31 @@ +From d22241efc0708c9799f17a20eabb52a48d6d6ea1 Mon Sep 17 00:00:00 2001 +From: Anuj Mittal <anuj.mittal@intel.com> +Date: Tue, 2 Jan 2018 12:35:32 +0800 +Subject: [PATCH] Linux: add support for X32 ABI compilation + +X32 follows ILP32 model. Check for ILP32 as well when checking for +x86_64 to ensure the defines are correct for X32 ABI. + +Upstream-Status: Submitted [https://github.com/acpica/acpica/pull/348] + +Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> +--- + source/include/platform/aclinux.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/source/include/platform/aclinux.h b/source/include/platform/aclinux.h +index 75b1d82..6b8ff73 100644 +--- a/source/include/platform/aclinux.h ++++ b/source/include/platform/aclinux.h +@@ -315,7 +315,7 @@ + #define ACPI_FLUSH_CPU_CACHE() + #define ACPI_CAST_PTHREAD_T(Pthread) ((ACPI_THREAD_ID) (Pthread)) + +-#if defined(__ia64__) || defined(__x86_64__) ||\ ++#if defined(__ia64__) || (defined(__x86_64__) && !defined(__ILP32__)) ||\ + defined(__aarch64__) || defined(__PPC64__) ||\ + defined(__s390x__) + #define ACPI_MACHINE_WIDTH 64 +-- +2.7.4 + diff --git a/poky/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch b/poky/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch new file mode 100644 index 000000000..5610ed9be --- /dev/null +++ b/poky/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch @@ -0,0 +1,72 @@ +From 69171c22f3872ecb4c1ab27985e93ca44084595e 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> +--- + acpica-unix2-20170303/source/compiler/aslfiles.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +diff --git a/acpica-unix2-20170303/source/compiler/aslfiles.c b/acpica-unix2-20170303/source/compiler/aslfiles.c +index 809090c..97898b1 100644 +--- a/acpica-unix2-20170303/source/compiler/aslfiles.c ++++ b/acpica-unix2-20170303/source/compiler/aslfiles.c +@@ -44,6 +44,10 @@ + #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") +@@ -607,6 +611,8 @@ FlOpenMiscOutputFiles ( + + if (Gbl_DebugFlag) + { ++ int fd; ++ + Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_DEBUG); + if (!Filename) + { +@@ -618,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 +@@ -635,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.9.1 + diff --git a/poky/meta/recipes-extended/acpica/files/rename-yy_scan_string-manually.patch b/poky/meta/recipes-extended/acpica/files/rename-yy_scan_string-manually.patch new file mode 100644 index 000000000..b62ca25ba --- /dev/null +++ b/poky/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 + |