31 lines
763 B
Diff
31 lines
763 B
Diff
Author: Niko Tyni <ntyni@iki.fi>
|
|
Description: Use the automatic 'remove extra libs' feature with speedy_backend too.
|
|
These unnecessary linking flags get removed: -lm -lcrypt -lpthread
|
|
--- a/speedy_backend/Makefile.PL
|
|
+++ b/speedy_backend/Makefile.PL
|
|
@@ -29,6 +29,10 @@
|
|
sub am_frontend {0}
|
|
sub my_name {'backend'}
|
|
|
|
+sub remove_libs { my $class = shift;
|
|
+ 'BIN=speedy_backend ../util/remove_libs';
|
|
+}
|
|
+
|
|
use ExtUtils::Embed;
|
|
|
|
my $tmp = "xsinit.tmp$$";
|
|
--- a/util/remove_libs
|
|
+++ b/util/remove_libs
|
|
@@ -3,7 +3,11 @@
|
|
# Remove extranaeous libs from the linking command. Reduces shared-library
|
|
# overhead at exec time.
|
|
|
|
-BIN=speedy
|
|
+# allow testing other binaries too
|
|
+if [ "x$BIN" = "x" ]
|
|
+then
|
|
+ BIN=speedy
|
|
+fi
|
|
TMP1=/tmp/remove_libs$$
|
|
TMP2="${TMP1}2"
|
|
|