Files
gentoo/dev-libs/jemalloc/files/jemalloc-5.3.0-gcc15-make-check.patch
NHOrus 7d27004878 dev-libs/jemalloc: Add -fno-builtin to CFLAGS when building integration tests
Patch from opensuse.
https://build.opensuse.org/projects/openSUSE:Factory/packages/jemalloc/files/fix_make_check_with_gcc15.patch
GCC 15 optimizes out allocations which aligned_alloc integration test
expects to fail.  Using the -fno-builtin option prevents GCC from
treating malloc specially in this way and the test-suite to pass.

Closes: https://bugs.gentoo.org/955995
Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/595
Signed-off-by: Sam James <sam@gentoo.org>
2026-04-11 22:27:08 +01:00

25 lines
1.0 KiB
Diff

https://bugs.gentoo.org/955995
From: Martin Jambor <mjambor@suse.cz>
Date: Wed, 30 Apr 2025 18:35:11 +0200
Subject: Add -fno-builtin to CFLAGS when building integration tests
References: boo#1240665, https://github.com/jemalloc/jemalloc/issues/2823
Upstream: tbd
GCC 15 optimizes out allocations which aligned_alloc integration test
expects to fail. Using the -fno-builtin option prevents GCC from
treating malloc specially in this way and the test-suite to pass.
Index: jemalloc-5.3.0/Makefile.in
===================================================================
--- jemalloc-5.3.0.orig/Makefile.in
+++ jemalloc-5.3.0/Makefile.in
@@ -654,6 +654,7 @@ uninstall: uninstall_doc
endif
tests_unit: $(TESTS_UNIT:$(srcroot)%.c=$(objroot)%$(EXE))
+tests_integration: CFLAGS += -fno-builtin
tests_integration: $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%$(EXE)) $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%$(EXE))
tests_analyze: $(TESTS_ANALYZE:$(srcroot)%.c=$(objroot)%$(EXE))
tests_stress: $(TESTS_STRESS:$(srcroot)%.c=$(objroot)%$(EXE))