about summary refs log tree commit diff
path: root/misc/Makefile
diff options
context:
space:
mode:
authorCarlos O'Donell <carlos@redhat.com>2024-06-19 11:48:05 -0400
committerAndreas K. Hüttel <dilfridge@gentoo.org>2024-07-01 17:20:30 +0200
commita7fe3e805d2ee128ac5f43b2a24201726d41cc04 (patch)
tree0b1908eb5001e30028839ae6c007fb865488a1bd /misc/Makefile
parent4f7eb238d0da989a9deb50e9cd441cca895957dc (diff)
downloadglibc-a7fe3e805d2ee128ac5f43b2a24201726d41cc04.tar.gz
glibc-a7fe3e805d2ee128ac5f43b2a24201726d41cc04.tar.xz
glibc-a7fe3e805d2ee128ac5f43b2a24201726d41cc04.zip
Fix conditionals on mtrace-based tests (bug 31892)
The conditionals for several mtrace-based tests in catgets, elf, libio,
malloc, misc, nptl, posix, and stdio-common were incorrect leading to
test failures when bootstrapping glibc without perl.

The correct conditional for mtrace-based tests requires three checks:
first checking for run-built-tests, then build-shared, and lastly that
PERL is not equal to "no" (missing perl).
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'misc/Makefile')
-rw-r--r--misc/Makefile16
1 files changed, 14 insertions, 2 deletions
diff --git a/misc/Makefile b/misc/Makefile
index c273ec6974..5d17c562fe 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -214,12 +214,18 @@ routines_no_fortify += \
   syslog \
   # routines_no_fortify
 
+ifeq ($(run-built-tests),yes)
+ifeq (yes,$(build-shared))
+ifneq ($(PERL),no)
 generated += \
   tst-allocate_once-mem.out \
   tst-allocate_once.mtrace \
   tst-error1-mem.out \
   tst-error1.mtrace \
   # generated
+endif
+endif
+endif
 
 aux := init-misc
 install-lib := libg.a
@@ -285,8 +291,14 @@ tests-internal += tst-fd_to_filename
 tests-static += tst-fd_to_filename
 
 ifeq ($(run-built-tests),yes)
-tests-special += $(objpfx)tst-error1-mem.out \
-  $(objpfx)tst-allocate_once-mem.out
+ifeq (yes,$(build-shared))
+ifneq ($(PERL),no)
+tests-special += \
+  $(objpfx)tst-allocate_once-mem.out \
+  $(objpfx)tst-error1-mem.out \
+  # tests-special
+endif
+endif
 endif
 
 tests-container := \