Files
pmaports-rtwo/device/testing/linux-realme-x3/disable-builtin-wcslen.patch
T
Aster Boese 83e7197431 linux-realme-x3: sync kconfig and build with LLVM
Syncs the linux-realme-x3 kernel config with kconfigcheck.toml and builds the
kernel with LLVM to follow policy.

See https://postmarketos.org/edge/2025/11/11/kernels-llvm/

Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8119>
2026-04-07 13:31:52 +00:00

29 lines
742 B
Diff

From 823246468ced0ba06f060c13c4b0db09a44512b9 Mon Sep 17 00:00:00 2001
From: Aster Boese <asterboese@mailbox.org>
Date: Tue, 3 Mar 2026 19:21:26 -0500
Subject: [PATCH] disable-builtin-wcslen
Backport 0af2f6be1b4281385b618cb86ad946eded089ac8
---
Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Makefile b/Makefile
index 79192a302..322ea1e7e 100644
--- a/Makefile
+++ b/Makefile
@@ -1005,6 +1005,9 @@ ifdef CONFIG_CC_IS_GCC
KBUILD_CFLAGS += -fconserve-stack
endif
+# Ensure compilers do not transform certain loops into calls to wcslen()
+KBUILD_CFLAGS += -fno-builtin-wcslen
+
# change __FILE__ to the relative path from the srctree
KBUILD_CPPFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
--
2.53.0