blob: 537af4188be5d435168f5c389433fb769cd7a223 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
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"
|