Skip to content

Commit

Permalink
Ports: Fix acpica-tools compilation on Clang toolchain
Browse files Browse the repository at this point in the history
The clang toolchain was broken because of unknown warning flags
in the Makefiles.

	* -Wlogical-op
	* -Wmissing-parameter-type
	* -Wold-style-declaration
  • Loading branch information
tbhaxor committed Aug 18, 2023
1 parent efd0f65 commit 14a3423
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 9 deletions.
17 changes: 8 additions & 9 deletions Ports/acpica-tools/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ files=(
"https://github.com/acpica/acpica/archive/refs/tags/${version}.tar.gz 2248799b7ca08a7711ac87d31924354ed49047507607d033bd327ba861ec4d31"
)


build() {
run make iasl
run make acpixtract
# FIXME: Make "run make acpiexec" to work
run make acpihelp
run make acpisrc
run make acpibin
}
_targets=(
iasl
acpixtract
acpihelp
acpisrc
acpibin
)
makeopts+=("${_targets[@]}")
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Gurkirat Singh <tbhaxor@gmail.com>
Date: Fri, 18 Aug 2023 08:17:35 +0530
Subject: [PATCH] Remove unsupported warning flags for Clang support

---
generate/efi/Makefile.config | 3 ---
generate/unix/Makefile.config | 3 ---
2 files changed, 6 deletions(-)

diff --git a/generate/efi/Makefile.config b/generate/efi/Makefile.config
index da49657bd1779cf1b45f019c05d98d4214d05487..8d4edc892cd563c43ea4240a7b9e103da536e786 100644
--- a/generate/efi/Makefile.config
+++ b/generate/efi/Makefile.config
@@ -157,9 +157,6 @@ CWARNINGFLAGS = \
-Wswitch-default\
-Wpointer-arith\
-Wempty-body\
- -Wlogical-op\
- -Wmissing-parameter-type\
- -Wold-style-declaration\
-Wtype-limits

ifneq ($(NOWERROR),TRUE)
diff --git a/generate/unix/Makefile.config b/generate/unix/Makefile.config
index 0374e09d880f0ecec165acc32e7b30a4dbb0c8cc..d92dcaa46363a24f2ec740fc736be0f6b1f3b327 100644
--- a/generate/unix/Makefile.config
+++ b/generate/unix/Makefile.config
@@ -241,9 +241,6 @@ ifneq ($(ACPI_HOST), _FreeBSD)
ifneq ($(ACPI_HOST), _APPLE)
CWARNINGFLAGS += \
-Woverride-init\
- -Wlogical-op\
- -Wmissing-parameter-type\
- -Wold-style-declaration\
-Wtype-limits
endif
endif
5 changes: 5 additions & 0 deletions Ports/acpica-tools/patches/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ We use the netbsd "acnetbsd.h" file here as a template.
Disable warnings for Werror=bad-function-cast


## `0004-Remove-unsupported-warning-flags-for-Clang-support.patch`

Remove unsupported warning flags for Clang support


0 comments on commit 14a3423

Please sign in to comment.