linux-pikaos-6.12.4/patches/0001-dkms-clang.patch
ferreo e83a99c192
Some checks failed
PikaOS Package Build Only (amd64-v3) / build (push) Failing after 1m3s
clang
2024-11-18 15:09:44 +00:00

51 lines
2.0 KiB
Diff

From 1e5a4a3f9c67c5abea53df6881192c8c5f43765c Mon Sep 17 00:00:00 2001
From: Eric Naim <dnaim@cachyos.org>
Date: Sat, 21 Sep 2024 23:46:05 +0800
Subject: [PATCH] Remove some Werror CFLAGS to increase compatibility with some
DKMS modules in clang-built kernels
Signed-off-by: Eric Naim <dnaim@cachyos.org>
---
scripts/Makefile.clang | 2 --
scripts/Makefile.extrawarn | 4 ----
2 files changed, 6 deletions(-)
diff --git a/scripts/Makefile.clang b/scripts/Makefile.clang
index 6c23c6af797f..59b2e19416af 100644
--- a/scripts/Makefile.clang
+++ b/scripts/Makefile.clang
@@ -31,9 +31,7 @@ endif
# certain optimization flags it knows it has not implemented.
# Make it behave more like gcc by erroring when these flags are encountered
# so they can be implemented or wrapped in cc-option.
-CLANG_FLAGS += -Werror=unknown-warning-option
CLANG_FLAGS += -Werror=ignored-optimization-argument
CLANG_FLAGS += -Werror=option-ignored
-CLANG_FLAGS += -Werror=unused-command-line-argument
KBUILD_CPPFLAGS += $(CLANG_FLAGS)
export CLANG_FLAGS
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 1d13cecc7cc7..ec97275c8852 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -12,7 +12,6 @@ KBUILD_CFLAGS += -Wundef
KBUILD_CFLAGS += -Werror=implicit-function-declaration
KBUILD_CFLAGS += -Werror=implicit-int
KBUILD_CFLAGS += -Werror=return-type
-KBUILD_CFLAGS += -Werror=strict-prototypes
KBUILD_CFLAGS += -Wno-format-security
KBUILD_CFLAGS += -Wno-trigraphs
KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,)
@@ -68,9 +67,6 @@ KBUILD_CFLAGS += $(KBUILD_CFLAGS-y) $(CONFIG_CC_IMPLICIT_FALLTHROUGH)
# Prohibit date/time macros, which would make the build non-deterministic
KBUILD_CFLAGS += -Werror=date-time
-# enforce correct pointer usage
-KBUILD_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types)
-
# Require designated initializers for all marked structures
KBUILD_CFLAGS += $(call cc-option,-Werror=designated-init)
--
2.46.1