summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr/klibc/Kbuild4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild
index 973b0c8179d85..eb13a70ed5719 100644
--- a/usr/klibc/Kbuild
+++ b/usr/klibc/Kbuild
@@ -89,6 +89,10 @@ endif
KLIBCCFLAGS_sprintf.o += $(call cc-option,-Wno-format-truncation, )
KLIBCCFLAGS_vsprintf.o += $(call cc-option,-Wno-format-truncation, )
+# Clang 14 optimises zalloc() to recursively call calloc(), without
+# this option
+KLIBCCFLAGS_zalloc.o += $(call cc-option,-fno-builtin-malloc, )
+
# sigsuspend.c includes <klibc/havesyscall.h> generated by syscalls/
# build, so require that to build first
$(obj)/sigsuspend.o: $(obj)/syscalls/klib.list