Magellan Linux

Contents of /trunk/zlib/patches/zlib-1.2.1-prelink.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 153 - (show annotations) (download)
Tue May 8 20:52:56 2007 UTC (17 years ago) by niro
File size: 2683 byte(s)
-import

1 --- Makefile.in.old 2004-10-19 04:01:40.073351200 +0000
2 +++ Makefile.in 2004-10-19 04:04:09.718601664 +0000
3 @@ -49,6 +49,8 @@
4 OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
5 zutil.o inflate.o infback.o inftrees.o inffast.o
6
7 +PIC_OBJS = $(OBJS:%.o=%.lo)
8 +
9 OBJA =
10 # to use the asm code: make OBJA=match.o
11
12 @@ -77,8 +79,11 @@
13 mv _match.o match.o
14 rm -f _match.s
15
16 -$(SHAREDLIBV): $(OBJS)
17 - $(LDSHARED) -o $@ $(OBJS)
18 +%.lo: %.c
19 + $(CC) $(CFLAGS) -DPIC -fPIC -c $< -o $@
20 +
21 +$(SHAREDLIBV): $(PIC_OBJS)
22 + $(LDSHARED) -o $@ $(PIC_OBJS) -lc
23 rm -f $(SHAREDLIB) $(SHAREDLIBM)
24 ln -s $@ $(SHAREDLIB)
25 ln -s $@ $(SHAREDLIBM)
26 @@ -89,13 +94,10 @@
27 minigzip$(EXE): minigzip.o $(LIBS)
28 $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
29
30 -install: $(LIBS)
31 +install-libs: $(LIBS)
32 -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi
33 - -@if [ ! -d $(includedir) ]; then mkdir -p $(includedir); fi
34 -@if [ ! -d $(libdir) ]; then mkdir -p $(libdir); fi
35 -@if [ ! -d $(man3dir) ]; then mkdir -p $(man3dir); fi
36 - cp zlib.h zconf.h $(includedir)
37 - chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
38 cp $(LIBS) $(libdir)
39 cd $(libdir); chmod 755 $(LIBS)
40 -@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
41 @@ -110,6 +112,11 @@
42 # The ranlib in install is needed on NeXTSTEP which checks file times
43 # ldconfig is for Linux
44
45 +install: install-libs
46 + -@if [ ! -d $(includedir) ]; then mkdir $(includedir); fi
47 + cp zlib.h zconf.h $(includedir)
48 + chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
49 +
50 uninstall:
51 cd $(includedir); \
52 cd $(libdir); rm -f libz.a; \
53 --- configure.old 2004-10-19 04:04:23.315534616 +0000
54 +++ configure 2004-10-19 04:07:56.916062400 +0000
55 @@ -73,7 +73,11 @@
56
57 if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
58 CC="$cc"
59 - SFLAGS=${CFLAGS-"-fPIC -O3"}
60 + #SFLAGS=${CFLAGS-"-fPIC -O3"}
61 + # the above is horribly wrong on a few archs where -fPIC should ALWAYS be
62 + # used in the creation of shared libraries. without the following, the
63 + # shared lib test will sometimes fail even when shared libs -can- be created.
64 + SFLAGS="${CFLAGS-"-O3"} -fPIC"
65 CFLAGS="$cflags"
66 case `(uname -s || echo unknown) 2>/dev/null` in
67 Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};;
68 @@ -160,7 +164,7 @@
69 if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" &&
70 test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then
71 CFLAGS="$SFLAGS"
72 - LIBS="$SHAREDLIBV"
73 + LIBS="$LIBS $SHAREDLIBV"
74 echo Building shared library $SHAREDLIBV with $CC.
75 elif test -z "$old_cc" -a -z "$old_cflags"; then
76 echo No shared library support.