mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-29 08:11:13 +00:00
Ports: Update acpica-tools to use other upstream
Also, update it to the latest revision, which makes it possible to build without most of the patches we needed before, but now we need our own definitions for LibC includes and to disable errors for the warning bad-function-cast.
This commit is contained in:
parent
f956cd6e6a
commit
061ebd0b15
Notes:
sideshowbarker
2024-07-18 22:57:59 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/061ebd0b15 Pull-request: https://github.com/SerenityOS/serenity/pull/20018 Reviewed-by: https://github.com/gmta ✅ Reviewed-by: https://github.com/timschumi ✅
|
@ -7,7 +7,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n
|
|||
| Port | Name | Version | Website |
|
||||
|-----------------------------------------------------|-----------------------------------------------------------------|---------------------------|--------------------------------------------------------------------------------|
|
||||
| [`aclock`](aclock/) | aclock | 2.3 | https://github.com/tenox7/aclock |
|
||||
| [`acpica-tools`](acpica-tools/) | ACPI Component Architecture Project Userspace Utilities | 20220331 | https://acpica.org/downloads |
|
||||
| [`acpica-tools`](acpica-tools/) | ACPI Component Architecture Project Userspace Utilities | R06_28_23 | https://github.com/acpica/acpica |
|
||||
| [`alpine`](alpine/) | Alpine Email Client | 2.26 | https://alpineapp.email |
|
||||
| [`angband`](angband/) | Angband | 4.2.4 | https://rephial.org |
|
||||
| [`Another-World`](Another-World/) | Another World Bytecode Interpreter | | https://github.com/fabiensanglard/Another-World-Bytecode-Interpreter |
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/usr/bin/env -S bash ../.port_include.sh
|
||||
port=acpica-tools
|
||||
version=20220331
|
||||
workdir="acpica-unix-${version}"
|
||||
files="https://acpica.org/sites/acpica/files/acpica-unix-${version}.tar.gz acpica-unix-${version}.tar.gz acaff68b14f1e0804ebbfc4b97268a4ccbefcfa053b02ed9924f2b14d8a98e21"
|
||||
version='R06_28_23'
|
||||
workdir="acpica-${version}"
|
||||
files="https://github.com/acpica/acpica/archive/refs/tags/${version}.tar.gz acpica-${version}.tar.gz 2248799b7ca08a7711ac87d31924354ed49047507607d033bd327ba861ec4d31"
|
||||
|
||||
|
||||
build() {
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Liav A <liavalb@gmail.com>
|
||||
Date: Fri, 27 May 2022 10:18:35 +0300
|
||||
Date: Fri, 14 Jul 2023 16:05:27 +0300
|
||||
Subject: [PATCH] Stop compiler warnings on dangling pointer
|
||||
|
||||
Use static variable to prevent using a dangling pointer from a previous
|
||||
stack trace.
|
||||
---
|
||||
source/components/utilities/utdebug.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
source/components/utilities/utdebug.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/source/components/utilities/utdebug.c b/source/components/utilities/utdebug.c
|
||||
index f789e68..fd18f5c 100644
|
||||
index 82e8a62050beec30d3b067a8516bb23f3808182a..f4b40bb5b10e8e3d9bf3d60b7332ba70aa40a2c6 100644
|
||||
--- a/source/components/utilities/utdebug.c
|
||||
+++ b/source/components/utilities/utdebug.c
|
||||
@@ -182,7 +182,7 @@ void
|
||||
|
@ -21,8 +19,8 @@ index f789e68..fd18f5c 100644
|
|||
+ static ACPI_SIZE CurrentSp;
|
||||
|
||||
|
||||
AcpiGbl_EntryStackPointer = &CurrentSp;
|
||||
@@ -205,7 +205,7 @@ void
|
||||
#pragma GCC diagnostic push
|
||||
@@ -210,7 +210,7 @@ void
|
||||
AcpiUtTrackStackPtr (
|
||||
void)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Liav A <liavalb@gmail.com>
|
||||
Date: Fri, 21 Jul 2023 10:20:46 +0300
|
||||
Subject: [PATCH] Add serenity definitions for LibC includes
|
||||
|
||||
We use the netbsd "acnetbsd.h" file here as a template.
|
||||
---
|
||||
source/include/platform/acenv.h | 3 ++
|
||||
source/include/platform/acserenity.h | 70 ++++++++++++++++++++++++++++
|
||||
2 files changed, 73 insertions(+)
|
||||
create mode 100644 source/include/platform/acserenity.h
|
||||
|
||||
diff --git a/source/include/platform/acenv.h b/source/include/platform/acenv.h
|
||||
index 1fc692db80309b254aea69f42cf4de39b08b7cc8..5db1ea09a5f6c9748af3ba51eed2c2f30126bfc5 100644
|
||||
--- a/source/include/platform/acenv.h
|
||||
+++ b/source/include/platform/acenv.h
|
||||
@@ -320,6 +320,9 @@
|
||||
#elif defined(__NetBSD__)
|
||||
#include "acnetbsd.h"
|
||||
|
||||
+#elif defined(__serenity__)
|
||||
+#include "acserenity.h"
|
||||
+
|
||||
#elif defined(__sun)
|
||||
#include "acsolaris.h"
|
||||
|
||||
diff --git a/source/include/platform/acserenity.h b/source/include/platform/acserenity.h
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..e17f097c5d6d9c0ac228ae7958f31acbb609c8e0
|
||||
--- /dev/null
|
||||
+++ b/source/include/platform/acserenity.h
|
||||
@@ -0,0 +1,70 @@
|
||||
+#ifndef __ACSERENITY_H__
|
||||
+#define __ACSERENITY_H__
|
||||
+
|
||||
+#define ACPI_UINTPTR_T uintptr_t
|
||||
+#define ACPI_USE_LOCAL_CACHE
|
||||
+#define ACPI_CAST_PTHREAD_T(x) ((ACPI_THREAD_ID) ACPI_TO_INTEGER (x))
|
||||
+
|
||||
+#ifdef _LP64
|
||||
+#define ACPI_MACHINE_WIDTH 64
|
||||
+#else
|
||||
+#define ACPI_MACHINE_WIDTH 32
|
||||
+#endif
|
||||
+
|
||||
+#define COMPILER_DEPENDENT_INT64 int64_t
|
||||
+#define COMPILER_DEPENDENT_UINT64 uint64_t
|
||||
+
|
||||
+#if defined(_KERNEL) || defined(_STANDALONE)
|
||||
+#ifdef _KERNEL_OPT
|
||||
+#include "opt_acpi.h" /* collect build-time options here */
|
||||
+#endif /* _KERNEL_OPT */
|
||||
+
|
||||
+#include <sys/param.h>
|
||||
+#include <sys/systm.h>
|
||||
+#include <machine/stdarg.h>
|
||||
+#include <machine/acpi_func.h>
|
||||
+
|
||||
+#define asm __asm
|
||||
+
|
||||
+#define ACPI_USE_NATIVE_DIVIDE
|
||||
+#define ACPI_USE_NATIVE_MATH64
|
||||
+
|
||||
+#define ACPI_SYSTEM_XFACE
|
||||
+#define ACPI_EXTERNAL_XFACE
|
||||
+#define ACPI_INTERNAL_XFACE
|
||||
+#define ACPI_INTERNAL_VAR_XFACE
|
||||
+
|
||||
+#ifdef ACPI_DEBUG
|
||||
+#define ACPI_DEBUG_OUTPUT
|
||||
+#define ACPI_DBG_TRACK_ALLOCATIONS
|
||||
+#ifdef DEBUGGER_THREADING
|
||||
+#undef DEBUGGER_THREADING
|
||||
+#endif /* DEBUGGER_THREADING */
|
||||
+#define DEBUGGER_THREADING 0 /* integrated with DDB */
|
||||
+#include "opt_ddb.h"
|
||||
+#ifdef DDB
|
||||
+#define ACPI_DISASSEMBLER
|
||||
+#define ACPI_DEBUGGER
|
||||
+#endif /* DDB */
|
||||
+#endif /* ACPI_DEBUG */
|
||||
+
|
||||
+#else /* defined(_KERNEL) || defined(_STANDALONE) */
|
||||
+
|
||||
+#include <ctype.h>
|
||||
+#include <stdint.h>
|
||||
+
|
||||
+/* Not building kernel code, so use libc */
|
||||
+#define ACPI_USE_STANDARD_HEADERS
|
||||
+
|
||||
+#define __cli()
|
||||
+#define __sti()
|
||||
+#define __cdecl
|
||||
+
|
||||
+#endif /* defined(_KERNEL) || defined(_STANDALONE) */
|
||||
+
|
||||
+/* Always use NetBSD code over our local versions */
|
||||
+#define ACPI_USE_SYSTEM_CLIBRARY
|
||||
+#define ACPI_USE_NATIVE_DIVIDE
|
||||
+#define ACPI_USE_NATIVE_MATH64
|
||||
+
|
||||
+#endif /* __ACSERENITY_H__ */
|
|
@ -1,26 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Liav A <liavalb@gmail.com>
|
||||
Date: Fri, 27 May 2022 10:19:35 +0300
|
||||
Subject: [PATCH] Disable sprintf debug message with formatting issues
|
||||
|
||||
---
|
||||
source/compiler/dtfield.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/source/compiler/dtfield.c b/source/compiler/dtfield.c
|
||||
index f931631..f9fb310 100644
|
||||
--- a/source/compiler/dtfield.c
|
||||
+++ b/source/compiler/dtfield.c
|
||||
@@ -280,9 +280,9 @@ DtCompileString (
|
||||
|
||||
if (Length > ByteLength)
|
||||
{
|
||||
- sprintf (AslGbl_MsgBuffer,
|
||||
- "Maximum %u characters, found %u characters [%s]",
|
||||
- ByteLength, Length, Field->Value);
|
||||
+ //sprintf (AslGbl_MsgBuffer,
|
||||
+ // "Maximum %u characters, found %u characters [%s]",
|
||||
+ // ByteLength, Length, Field->Value);
|
||||
DtError (ASL_ERROR, ASL_MSG_STRING_LENGTH, Field, AslGbl_MsgBuffer);
|
||||
Length = ByteLength;
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Liav A <liavalb@gmail.com>
|
||||
Date: Fri, 21 Jul 2023 10:27:26 +0300
|
||||
Subject: [PATCH] Disable warnings for Werror=bad-function-cast
|
||||
|
||||
---
|
||||
generate/unix/Makefile.config | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/generate/unix/Makefile.config b/generate/unix/Makefile.config
|
||||
index 0deeb14115c1473ef0e1b55f6e174122ae52633d..0374e09d880f0ecec165acc32e7b30a4dbb0c8cc 100644
|
||||
--- a/generate/unix/Makefile.config
|
||||
+++ b/generate/unix/Makefile.config
|
||||
@@ -202,6 +202,7 @@ CWARNINGFLAGS = \
|
||||
-std=c99\
|
||||
-Wall\
|
||||
-Wbad-function-cast\
|
||||
+ -Wno-error=bad-function-cast\
|
||||
-Wdeclaration-after-statement\
|
||||
-Wformat=2\
|
||||
-Wmissing-declarations\
|
|
@ -1,33 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Liav A <liavalb@gmail.com>
|
||||
Date: Fri, 27 May 2022 22:00:38 +0300
|
||||
Subject: [PATCH] Fix printf bad specifier formatting
|
||||
|
||||
Fix sprintf specifier being written in a bad format leading to iASL to
|
||||
crash.
|
||||
---
|
||||
source/common/dmtable.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/source/common/dmtable.c b/source/common/dmtable.c
|
||||
index 440c5fb..d722e3d 100644
|
||||
--- a/source/common/dmtable.c
|
||||
+++ b/source/common/dmtable.c
|
||||
@@ -977,7 +977,7 @@ AcpiDmLineHeader (
|
||||
{
|
||||
if (ByteLength)
|
||||
{
|
||||
- AcpiOsPrintf ("[%3.3Xh %4.4d% 4d] %28s : ",
|
||||
+ AcpiOsPrintf ("[%3.3Xh %4.4d %4d] %28s : ",
|
||||
Offset, Offset, ByteLength, Name);
|
||||
}
|
||||
else
|
||||
@@ -1011,7 +1011,7 @@ AcpiDmLineHeader2 (
|
||||
}
|
||||
else
|
||||
{
|
||||
- AcpiOsPrintf ("%36s % 3d : ",
|
||||
+ AcpiOsPrintf ("%36s %3d : ",
|
||||
Name, Value);
|
||||
}
|
||||
}
|
|
@ -4,18 +4,15 @@
|
|||
|
||||
Stop compiler warnings on dangling pointer
|
||||
|
||||
Use static variable to prevent using a dangling pointer from a previous
|
||||
stack trace.
|
||||
|
||||
## `0002-Disable-sprintf-debug-message-with-formatting-issues.patch`
|
||||
## `0002-Add-serenity-definitions-for-LibC-includes.patch`
|
||||
|
||||
Disable sprintf debug message with formatting issues
|
||||
Add serenity definitions for LibC includes
|
||||
|
||||
We use the netbsd "acnetbsd.h" file here as a template.
|
||||
|
||||
## `0003-Disable-warnings-for-Werror-bad-function-cast.patch`
|
||||
|
||||
Disable warnings for Werror=bad-function-cast
|
||||
|
||||
|
||||
## `0003-Fix-printf-bad-specifier-formatting.patch`
|
||||
|
||||
Fix printf bad specifier formatting
|
||||
|
||||
Fix sprintf specifier being written in a bad format leading to iASL to
|
||||
crash.
|
||||
|
||||
|
|
Loading…
Reference in a new issue