aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--malloc/Makefile4
-rw-r--r--malloc/mtrace.pl7
2 files changed, 4 insertions, 7 deletions
diff --git a/malloc/Makefile b/malloc/Makefile
index cc14cf6..02aff1b 100644
--- a/malloc/Makefile
+++ b/malloc/Makefile
@@ -250,7 +250,6 @@ others-extras = mcheck-init.o
aux := set-freeres thread-freeres
# The Perl script to analyze the output of the mtrace functions.
-ifneq ($(PERL),no)
install-bin-script = mtrace
generated += mtrace
@@ -261,7 +260,6 @@ address-width=10
else
address-width=18
endif
-endif
# Unless we get a test for the availability of libgd which also works
# for cross-compiling we disable the memusagestat generation in this
@@ -349,7 +347,7 @@ sLIBdir := $(shell echo $(slibdir) | sed 's,lib\(\|64\)$$,\\\\$$LIB,')
$(objpfx)mtrace: mtrace.pl
rm -f $@.new
- sed -e 's|@PERL@|$(PERL)|' -e 's|@XXX@|$(address-width)|' \
+ sed -e 's|@XXX@|$(address-width)|' \
-e 's|@VERSION@|$(version)|' \
-e 's|@PKGVERSION@|$(PKGVERSION)|' \
-e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|' $^ > $@.new \
diff --git a/malloc/mtrace.pl b/malloc/mtrace.pl
index 075da0d..dc60858 100644
--- a/malloc/mtrace.pl
+++ b/malloc/mtrace.pl
@@ -1,6 +1,6 @@
-#! @PERL@
-eval "exec @PERL@ -S $0 $@"
- if 0;
+#! /bin/sh
+eval exec "perl -e 'shift; \$progname=shift; shift; require \$progname'" . "$0" . "$@"
+ if 0;
# Copyright (C) 1997-2024 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Based on the mtrace.awk script.
@@ -22,7 +22,6 @@ eval "exec @PERL@ -S $0 $@"
$VERSION = "@VERSION@";
$PKGVERSION = "@PKGVERSION@";
$REPORT_BUGS_TO = '@REPORT_BUGS_TO@';
-$progname = $0;
sub usage {
print "Usage: mtrace [OPTION]... [Binary] MtraceData\n";