clang
Some checks failed
PikaOS Package Build Only (amd64-v3) / build (push) Failing after 1m3s

This commit is contained in:
ferreo 2024-11-18 15:09:44 +00:00
parent 3af6346ca1
commit e83a99c192
5 changed files with 55 additions and 3 deletions

View File

@ -1 +1 @@
2
1

View File

@ -0,0 +1,50 @@
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

View File

@ -1,4 +1,5 @@
0001-cachyos-base-all.patch
0001-dkms-clang.patch
0002-bore-cachy.patch
0003-lazy.patch
0004-zerofanstop1.patch

View File

@ -2,4 +2,4 @@
echo "Pika Kernel - Building"
make -j`nproc` bindeb-pkg LOCALVERSION=-pikaos KDEB_PKGVERSION=$(make kernelversion)-101pika1
make CC=clang LD=ld.lld LLVM=1 LLVM_IAS=1 -j`nproc` bindeb-pkg LOCALVERSION=-pikaos KDEB_PKGVERSION=$(make kernelversion)-101pika1

View File

@ -9,10 +9,11 @@ scripts/config -k -e CONFIG_GENERIC_CPU3
scripts/config -e CACHY
scripts/config -e SCHED_BORE
scripts/config -e LTO -e LTO_CLANG -e ARCH_SUPPORTS_LTO_CLANG -e ARCH_SUPPORTS_LTO_CLANG_THIN -e HAS_LTO_CLANG -e LTO_CLANG_THIN -d LTO_NONE -e HAVE_GCC_PLUGINS
scripts/config -e HZ_1000 --set-val HZ 1000
scripts/config -d HZ_PERIODIC -d NO_HZ_IDLE -d CONTEXT_TRACKING_FORCE -e NO_HZ_FULL_NODEF -e NO_HZ_FULL -e NO_HZ -e NO_HZ_COMMON -e CONTEXT_TRACKING
scripts/config -e PREEMPT_BUILD -d PREEMPT_NONE -d PREEMPT_VOLUNTARY -e PREEMPT -e PREEMPT_COUNT -e PREEMPTION -e PREEMPT_DYNAMIC
scripts/config -d CC_OPTIMIZE_FOR_PERFORMANCE \
-e CC_OPTIMIZE_FOR_PERFORMANCE_O3