Apply ld-as-needed.patch from Ubunto to enable --as-needed
[tabix.git] / debian / patches / ld-as-needed.patch
diff --git a/debian/patches/ld-as-needed.patch b/debian/patches/ld-as-needed.patch
new file mode 100644 (file)
index 0000000..89fa1ed
--- /dev/null
@@ -0,0 +1,16 @@
+Description: Reorder libraries to build with ld --as-needed
+Author: David Shorten <dpshorten@gmail.com>
+Bug-Ubuntu: http://bugs.launchpad.net/ubuntu/+source/tabix/+bug/803202
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632150
+Last-Update: 2011-06-30
+--- tabix.orig/Makefile
++++ tabix/Makefile
+@@ -38,7 +38,7 @@
+               $(AR) -cru $@ $(LOBJS)
+ tabix:lib $(AOBJS)
+-              $(CC) $(CFLAGS) -o $@ $(AOBJS) -lm $(LIBPATH) -lz -L. -ltabix
++              $(CC) $(CFLAGS) -o $@ $(AOBJS) -L. -ltabix -lm $(LIBPATH) -lz  
+ bgzip:bgzip.o bgzf.o knetfile.o
+               $(CC) $(CFLAGS) -o $@ bgzip.o bgzf.o knetfile.o -lz