File: 80strip-backend-libs.patch

package info (click to toggle)
speedy-cgi-perl 2.22-13
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 1,144 kB
  • ctags: 884
  • sloc: ansic: 4,487; perl: 958; sh: 806; makefile: 91
file content (31 lines) | stat: -rw-r--r-- 763 bytes parent folder | download
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"