47e497eaee
This commit allows the package patches to be applied with fuzz factor 0. The fuzz factor specifies how many lines of the patch can be inexactly matched, so the value 0 requires all lines to be exactly matched. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
59 lines
1.8 KiB
Diff
59 lines
1.8 KiB
Diff
Build objects twice for shared and static libraries
|
|
|
|
The existing Makefile causes problems on MIPS because the same object
|
|
files (not compiled with -fPIC) are used in static and shared libraries.
|
|
MIPS will refuce to link non-pic objects in shared libraries.
|
|
We fix this problems by creating a new rule for the shared library
|
|
and build the shared objects as *.sho instead of *.o.
|
|
Then, we use these objects to create the shared library.
|
|
|
|
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
|
|
[Dario: make the patch to be applied with fuzz factor 0]
|
|
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
|
|
|
|
Index: bzip2-1.0.6/Makefile-libbz2_so
|
|
===================================================================
|
|
--- bzip2-1.0.6.orig/Makefile-libbz2_so
|
|
+++ bzip2-1.0.6/Makefile-libbz2_so
|
|
@@ -26,13 +26,13 @@ CC=gcc
|
|
BIGFILES=-D_FILE_OFFSET_BITS=64
|
|
CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES)
|
|
|
|
-OBJS= blocksort.o \
|
|
- huffman.o \
|
|
- crctable.o \
|
|
- randtable.o \
|
|
- compress.o \
|
|
- decompress.o \
|
|
- bzlib.o
|
|
+OBJS= blocksort.sho \
|
|
+ huffman.sho \
|
|
+ crctable.sho \
|
|
+ randtable.sho \
|
|
+ compress.sho \
|
|
+ decompress.sho \
|
|
+ bzlib.sho
|
|
|
|
all: $(OBJS)
|
|
$(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.8 $(OBJS)
|
|
@@ -43,17 +43,5 @@ all: $(OBJS)
|
|
clean:
|
|
rm -f $(OBJS) bzip2.o libbz2.so.1.0.8 libbz2.so.1.0 bzip2-shared
|
|
|
|
-blocksort.o: blocksort.c
|
|
- $(CC) $(CFLAGS) -c blocksort.c
|
|
-huffman.o: huffman.c
|
|
- $(CC) $(CFLAGS) -c huffman.c
|
|
-crctable.o: crctable.c
|
|
- $(CC) $(CFLAGS) -c crctable.c
|
|
-randtable.o: randtable.c
|
|
- $(CC) $(CFLAGS) -c randtable.c
|
|
-compress.o: compress.c
|
|
- $(CC) $(CFLAGS) -c compress.c
|
|
-decompress.o: decompress.c
|
|
- $(CC) $(CFLAGS) -c decompress.c
|
|
-bzlib.o: bzlib.c
|
|
- $(CC) $(CFLAGS) -c bzlib.c
|
|
+%.sho: %.c
|
|
+ $(CC) $(CFLAGS) -o $@ -c $<
|