Update to 20190108 version of the upstream source

Signed-off-by: Al Stone <ahs3@redhat.com>
This commit is contained in:
Al Stone 2019-05-10 15:03:56 -06:00
parent e064ea65fd
commit 59c5fb80cd
7 changed files with 82 additions and 7 deletions

2
.gitignore vendored
View File

@ -105,3 +105,5 @@ series
/acpitests-unix-20181031.tar.gz
/acpica-unix2-20181213.tar.gz
/acpitests-unix-20181213.tar.gz
/acpica-unix2-20190108.tar.gz
/acpitests-unix-20190108.tar.gz

View File

@ -1,6 +1,6 @@
Name: acpica-tools
Version: 20181213
Release: 3%{?dist}
Version: 20190108
Release: 1%{?dist}
Summary: ACPICA tools for the development and debug of ACPI tables
License: GPLv2
@ -43,6 +43,7 @@ Patch15: str-trunc-warn.patch
Patch16: ptr-cast.patch
Patch17: aslcodegen.patch
Patch18: facp.patch
Patch19: gcc9.patch
BuildRequires: bison patchutils flex gcc
@ -111,6 +112,7 @@ gzip -dc %{SOURCE1} | tar -x --strip-components=1 -f -
%patch16 -p1 -b .ptr-cast
%patch17 -p1 -b .aslcodegen
%patch18 -p1 -b .facp
%patch19 -p1 -b .gcc9
cp -p %{SOURCE2} README.Fedora
cp -p %{SOURCE3} iasl.1
@ -239,6 +241,12 @@ fi
%changelog
* Fri May 10 2019 Al Stone <ahs3@redhat.com> - 20190108-1
- Update to 20190108 source tree, including patch refeshes.
- Replace use of strncpy() with memcpy() when moving ASCII bytes around;
the tables use "strings" but they are seldom null terminated, causing
GCC9 to complain. Closes BZ#1674629.
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 20181213-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

View File

@ -256,7 +256,7 @@ Warning 3144 - ^ Method Local is set but never used
Intel ACPI Component Architecture
ASL+ Optimizing Compiler/Disassembler version VVVVVVVV
Copyright (c) 2000 - 2018 Intel Corporation
Copyright (c) 2000 - 2019 Intel Corporation
Ignoring all errors, forcing AML file generation

View File

@ -16,7 +16,7 @@ Remark 2158 - ^ Unnecessary/redundant use of Offset
Intel ACPI Component Architecture
ASL+ Optimizing Compiler/Disassembler version VVVVVVVV
Copyright (c) 2000 - 2018 Intel Corporation
Copyright (c) 2000 - 2019 Intel Corporation
ASL Input: converterSample.asl - 85 lines, 1968 bytes, 11 keywords
AML Output: converterSample.aml - 180 bytes, 9 named objects, 2 executable opcodes

65
gcc9.patch Normal file
View File

@ -0,0 +1,65 @@
diff -Naur acpica-unix2-20190108/source/common/dmrestag.c acpica-unix2-20190108-patch/source/common/dmrestag.c
--- acpica-unix2-20190108/source/common/dmrestag.c 2019-01-08 14:10:31.000000000 -0700
+++ acpica-unix2-20190108-patch/source/common/dmrestag.c 2019-05-10 13:57:10.768398838 -0600
@@ -710,10 +710,25 @@
* end up in the final compiled AML, it's just an appearance issue for the
* disassembled code.
*/
- Pathname[strlen (Pathname) - ACPI_NAME_SIZE] = 0;
- strncat (Pathname, ResourceNode->Name.Ascii, ACPI_NAME_SIZE);
- strcat (Pathname, ".");
- strncat (Pathname, Tag, ACPI_NAME_SIZE);
+ {
+ /*
+ * GCC9 forces some contortions when non-null-terminated char
+ * strings are being used; using strncat() might be simpler,
+ * but the assumption that the string is null-terminated gets
+ * checked and AML does not always guarantee that is true.
+ */
+ char *tmp;
+ unsigned char dot = '.';
+
+ Pathname[strlen (Pathname) - ACPI_NAME_SIZE] = 0;
+ tmp = Pathname + strlen(Pathname);
+ memcpy (tmp, ResourceNode->Name.Ascii, ACPI_NAME_SIZE);
+ tmp += ACPI_NAME_SIZE;
+ memcpy (tmp, &dot, 1);
+ tmp++;
+ memcpy (tmp, Tag, ACPI_NAME_SIZE);
+ tmp += ACPI_NAME_SIZE;
+ }
/* Internalize the namepath to AML format */
diff -Naur acpica-unix2-20190108/source/compiler/aslcodegen.c acpica-unix2-20190108-patch/source/compiler/aslcodegen.c
--- acpica-unix2-20190108/source/compiler/aslcodegen.c 2019-05-10 13:40:12.827411487 -0600
+++ acpica-unix2-20190108-patch/source/compiler/aslcodegen.c 2019-05-10 13:25:34.667850614 -0600
@@ -450,11 +450,11 @@
*/
if (AcpiGbl_CaptureComments)
{
- strncpy(AcpiGbl_TableSig, Child->Asl.Value.String, ACPI_NAME_SIZE);
+ memcpy(AcpiGbl_TableSig, Child->Asl.Value.String, ACPI_NAME_SIZE);
Child->Asl.Value.String = ACPI_SIG_XXXX;
}
- strncpy (AslGbl_TableHeader.Signature, Child->Asl.Value.String, ACPI_NAME_SIZE);
+ memcpy (AslGbl_TableHeader.Signature, Child->Asl.Value.String, ACPI_NAME_SIZE);
/* Revision */
@@ -471,12 +471,12 @@
/* OEMID */
Child = Child->Asl.Next;
- strncpy (AslGbl_TableHeader.OemId, Child->Asl.Value.String, ACPI_OEM_ID_SIZE);
+ memcpy (AslGbl_TableHeader.OemId, Child->Asl.Value.String, ACPI_OEM_ID_SIZE);
/* OEM TableID */
Child = Child->Asl.Next;
- strncpy (AslGbl_TableHeader.OemTableId, Child->Asl.Value.String, ACPI_OEM_TABLE_ID_SIZE);
+ memcpy (AslGbl_TableHeader.OemTableId, Child->Asl.Value.String, ACPI_OEM_TABLE_ID_SIZE);
/* OEM Revision */

View File

@ -364,7 +364,7 @@ Warning 3141 - Missing dependency ^ (Device object requires a _HID or _ADR i
Intel ACPI Component Architecture
ASL+ Optimizing Compiler/Disassembler version VVVVVVVV
Copyright (c) 2000 - 2018 Intel Corporation
Copyright (c) 2000 - 2019 Intel Corporation
Ignoring all errors, forcing AML file generation

View File

@ -1,2 +1,2 @@
SHA512 (acpica-unix2-20181213.tar.gz) = 98269e90deabf19ba9f717a9778fc3340b4ffe3461a98660099d9dfcb9ddc2cfc429c9724a019df96ca44e663111de5bcdde2df4cad42db025f3f93faad7412b
SHA512 (acpitests-unix-20181213.tar.gz) = 4c8adb76640574399fc1939db623a5d05c56c09e6c6531ebfa452c30adf92313ac97020fe358115a9624f1b039f946c0a6d63b4fb2e340123b9747c0f94d9cd6
SHA512 (acpica-unix2-20190108.tar.gz) = 181363df0c1b71fbda90bc71d035c7822c6e05fbfcdcac7b65f1baa6524126f50bfe3a7b5e91d0fc1f4c83f0d1762904a573aed4a48c8a8076f22caee68c2ffb
SHA512 (acpitests-unix-20190108.tar.gz) = 451083a753e2bb47c11f5bcf6c35c61ccce80ce4d4e982edbe5aa339386e97a9ee08607ef4b29e3acd54c41f2aeb3ce616c8e654642a513ae3d14bdc1ee49fc6