From 178c0e48c3c0c65a93185b4b90bb87c4dec14dc9 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 9 Mar 2021 21:07:24 +0100 Subject: malloc: Turn tst-mallocstate into a non-internal test compat_symbol_reference no longer needs tests-internal. Do not build the test at all for newer targets, so that no spurious UNSUPPORTED result is generated. Use compat_symbol_reference for __malloc_initialize_hook as well, eliminating the need for -rdynamic. Reviewed-by: DJ Delorie --- malloc/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'malloc/Makefile') diff --git a/malloc/Makefile b/malloc/Makefile index 583bbefb0d..641967c512 100644 --- a/malloc/Makefile +++ b/malloc/Makefile @@ -47,7 +47,12 @@ tests-static := \ tst-interpose-static-thread \ tst-malloc-usable-static \ -tests-internal := tst-mallocstate tst-scratch_buffer +# Test for the malloc_set_state symbol removed in glibc 2.25. +ifeq ($(have-GLIBC_2.24)$(build-shared),yesyes) +tests += tst-mallocstate +endif + +tests-internal := tst-scratch_buffer # The dynarray framework is only available inside glibc. tests-internal += \ @@ -118,9 +123,6 @@ $(objpfx)tst-malloc-thread-fail-mcheck: $(shared-thread-library) $(objpfx)tst-malloc-fork-deadlock-mcheck: $(shared-thread-library) $(objpfx)tst-malloc-stats-cancellation-mcheck: $(shared-thread-library) -# Export the __malloc_initialize_hook variable to libc.so. -LDFLAGS-tst-mallocstate = -rdynamic - # These should be removed by `make clean'. extra-objs = mcheck-init.o libmcheck.a others-extras = mcheck-init.o -- cgit v1.2.3-70-g09d2