bzip2: compile all files using -fpic.
Also constified two large arrays.
This commit is contained in:
parent
266a4447d9
commit
d9214b1d6d
|
@ -1,2 +1,2 @@
|
|||
3c15a0c8d1d3ee1c46a1634d00617b1a bzip2-1.0.5.tar.gz
|
||||
589eeb94dad93f69b366e711ef328cb5 bzip2.patch
|
||||
37fba3cadef5fbffee9107c61ff24373 bzip2.patch
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
name=bzip2
|
||||
version=1.0.5
|
||||
release=1
|
||||
release=2
|
||||
source=(http://www.bzip.org/$version/$name-$version.tar.gz \
|
||||
$name.patch)
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
diff -aur bzip2-1.0.4.orig/Makefile bzip2-1.0.4/Makefile
|
||||
--- bzip2-1.0.4.orig/Makefile 2007-01-03 04:49:21.000000000 +0100
|
||||
+++ bzip2-1.0.4/Makefile 2007-01-06 12:48:28.735127995 +0100
|
||||
diff -aur bzip2-1.0.5.orig/Makefile bzip2-1.0.5/Makefile
|
||||
--- bzip2-1.0.5.orig/Makefile 2008-02-14 13:39:18.000000000 +0100
|
||||
+++ bzip2-1.0.5/Makefile 2009-06-14 13:49:03.889599030 +0200
|
||||
@@ -21,7 +21,7 @@
|
||||
LDFLAGS=
|
||||
|
||||
BIGFILES=-D_FILE_OFFSET_BITS=64
|
||||
-CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
|
||||
+CFLAGS+=-Wall -Winline $(BIGFILES)
|
||||
+CFLAGS+=-fpic -Wall -Winline $(BIGFILES)
|
||||
|
||||
# Where you want it installed when you do 'make install'
|
||||
PREFIX=/usr/local
|
||||
|
@ -84,15 +84,15 @@ diff -aur bzip2-1.0.4.orig/Makefile bzip2-1.0.4/Makefile
|
|||
|
||||
clean:
|
||||
rm -f *.o libbz2.a bzip2 bzip2recover \
|
||||
diff -aur bzip2-1.0.4.orig/Makefile-libbz2_so bzip2-1.0.4/Makefile-libbz2_so
|
||||
--- bzip2-1.0.4.orig/Makefile-libbz2_so 2007-01-03 03:00:55.000000000 +0100
|
||||
+++ bzip2-1.0.4/Makefile-libbz2_so 2007-01-06 12:46:33.363917744 +0100
|
||||
diff -aur bzip2-1.0.5.orig/Makefile-libbz2_so bzip2-1.0.5/Makefile-libbz2_so
|
||||
--- bzip2-1.0.5.orig/Makefile-libbz2_so 2007-12-09 14:00:50.000000000 +0100
|
||||
+++ bzip2-1.0.5/Makefile-libbz2_so 2009-06-14 13:48:27.519580669 +0200
|
||||
@@ -24,7 +24,7 @@
|
||||
SHELL=/bin/sh
|
||||
CC=gcc
|
||||
BIGFILES=-D_FILE_OFFSET_BITS=64
|
||||
-CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES)
|
||||
+CFLAGS+=-fpic -fPIC -Wall -Winline $(BIGFILES)
|
||||
+CFLAGS+=-fpic -Wall -Winline $(BIGFILES)
|
||||
|
||||
OBJS= blocksort.o \
|
||||
huffman.o \
|
||||
|
@ -115,3 +115,48 @@ diff -aur bzip2-1.0.4.orig/Makefile-libbz2_so bzip2-1.0.4/Makefile-libbz2_so
|
|||
|
||||
blocksort.o: blocksort.c
|
||||
$(CC) $(CFLAGS) -c blocksort.c
|
||||
diff -aur bzip2-1.0.5.orig/bzlib_private.h bzip2-1.0.5/bzlib_private.h
|
||||
--- bzip2-1.0.5.orig/bzlib_private.h 2007-12-09 15:00:46.000000000 +0100
|
||||
+++ bzip2-1.0.5/bzlib_private.h 2009-06-14 13:53:28.200579230 +0200
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
/*-- Stuff for randomising repetitive blocks. --*/
|
||||
|
||||
-extern Int32 BZ2_rNums[512];
|
||||
+extern const Int32 BZ2_rNums[512];
|
||||
|
||||
#define BZ_RAND_DECLS \
|
||||
Int32 rNToGo; \
|
||||
@@ -152,7 +152,7 @@
|
||||
|
||||
/*-- Stuff for doing CRCs. --*/
|
||||
|
||||
-extern UInt32 BZ2_crc32Table[256];
|
||||
+extern const UInt32 BZ2_crc32Table[256];
|
||||
|
||||
#define BZ_INITIALISE_CRC(crcVar) \
|
||||
{ \
|
||||
diff -aur bzip2-1.0.5.orig/crctable.c bzip2-1.0.5/crctable.c
|
||||
--- bzip2-1.0.5.orig/crctable.c 2007-12-09 13:29:49.000000000 +0100
|
||||
+++ bzip2-1.0.5/crctable.c 2009-06-14 13:52:33.248830630 +0200
|
||||
@@ -28,7 +28,7 @@
|
||||
comp.compression FAQ.
|
||||
--*/
|
||||
|
||||
-UInt32 BZ2_crc32Table[256] = {
|
||||
+const UInt32 BZ2_crc32Table[256] = {
|
||||
|
||||
/*-- Ugly, innit? --*/
|
||||
|
||||
diff -aur bzip2-1.0.5.orig/randtable.c bzip2-1.0.5/randtable.c
|
||||
--- bzip2-1.0.5.orig/randtable.c 2007-12-09 13:32:55.000000000 +0100
|
||||
+++ bzip2-1.0.5/randtable.c 2009-06-14 13:53:38.063580427 +0200
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
/*---------------------------------------------*/
|
||||
-Int32 BZ2_rNums[512] = {
|
||||
+const Int32 BZ2_rNums[512] = {
|
||||
619, 720, 127, 481, 931, 816, 813, 233, 566, 247,
|
||||
985, 724, 205, 454, 863, 491, 741, 242, 949, 214,
|
||||
733, 859, 335, 708, 621, 574, 73, 654, 730, 472,
|
||||
|
|
Loading…
Reference in New Issue
Block a user