Refreshed hardening patch.
authorCharles Plessy <plessy@debian.org>
Fri, 22 Jun 2012 04:00:10 +0000 (13:00 +0900)
committerCharles Plessy <plessy@debian.org>
Fri, 22 Jun 2012 04:00:10 +0000 (13:00 +0900)
debian/patches/use-dpkg-buildflags.patch

index 7ece66bd6d07fdf4395ef65a81736e63e7032318..0275175afaa8e874404d2b31a00f1d3b60ee8cd1 100644 (file)
@@ -2,8 +2,8 @@ Author: Simon Ruderich <simon@ruderich.org>
 Date: Sat, 28 Apr 2012 19:09:02 UTC
 Description: Fix build system to enable hardening flags
 
 Date: Sat, 28 Apr 2012 19:09:02 UTC
 Description: Fix build system to enable hardening flags
 
---- tabix.orig/Makefile
-+++ tabix/Makefile
+--- a/Makefile
++++ b/Makefile
 @@ -1,5 +1,8 @@
  CC=                   gcc
 -CFLAGS=               -g -Wall -O2 -fPIC #-m64 #-arch ppc
 @@ -1,5 +1,8 @@
  CC=                   gcc
 -CFLAGS=               -g -Wall -O2 -fPIC #-m64 #-arch ppc
@@ -11,7 +11,7 @@ Description: Fix build system to enable hardening flags
 +CFLAGS?=              -g -Wall -O2
 +# But always append special flags we need.
 +CFLAGS+= -fPIC #-m64 #-arch ppc
 +CFLAGS?=              -g -Wall -O2
 +# But always append special flags we need.
 +CFLAGS+= -fPIC #-m64 #-arch ppc
- DFLAGS=               -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE
+ DFLAGS=               -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -DBGZF_CACHE
  LOBJS=                bgzf.o kstring.o knetfile.o index.o bedidx.o
  AOBJS=                main.o
 @@ -12,7 +15,7 @@
  LOBJS=                bgzf.o kstring.o knetfile.o index.o bedidx.o
  AOBJS=                main.o
 @@ -12,7 +15,7 @@
@@ -35,11 +35,11 @@ Description: Fix build system to enable hardening flags
 +              libtool $(CFLAGS) $(LDFLAGS) -dynamic $(LOBJS) -o $@ -lc -lz
  
  libtabix.a:$(LOBJS)
 +              libtool $(CFLAGS) $(LDFLAGS) -dynamic $(LOBJS) -o $@ -lc -lz
  
  libtabix.a:$(LOBJS)
-               $(AR) -cru $@ $(LOBJS)
+               $(AR) -csru $@ $(LOBJS)
  
  tabix:lib $(AOBJS)
  
  tabix:lib $(AOBJS)
--              $(CC) $(CFLAGS) -o $@ $(AOBJS) -lm $(LIBPATH) -lz -L. -ltabix
-+              $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(AOBJS) -lm $(LIBPATH) -lz -L. -ltabix
+-              $(CC) $(CFLAGS) -o $@ $(AOBJS) -L. -ltabix -lm $(LIBPATH) -lz
++              $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(AOBJS) -L. -ltabix -lm $(LIBPATH) -lz
  
  bgzip:bgzip.o bgzf.o knetfile.o
 -              $(CC) $(CFLAGS) -o $@ bgzip.o bgzf.o knetfile.o -lz
  
  bgzip:bgzip.o bgzf.o knetfile.o
 -              $(CC) $(CFLAGS) -o $@ bgzip.o bgzf.o knetfile.o -lz