SHA256
8
0
forked from pool/jemalloc
Files
jemalloc/fix_make_check_with_gcc15.patch
Jan Engelhardt 0fbaaf67fd - Add fix_make_check_with_gcc15.patch to make the testsuite pass
despite new GCC malloc-related optimizations. [boo#1240665]

If the request is OK, please forward it to Factory soon so that we can
switch the default compiler.

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/jemalloc?expand=0&rev=89
2025-05-01 05:59:00 +00:00

24 lines
1022 B
Diff

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))