X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/4fff6624adfe73cb54067fba53606ef9b9fe711f..86154153a622f87b6cc6209e355351975c82efb4:/package/zlib/patches/100-cross_compile.patch?ds=inline diff --git a/package/zlib/patches/100-cross_compile.patch b/package/zlib/patches/100-cross_compile.patch index 1325462ba..805a1a8e6 100644 --- a/package/zlib/patches/100-cross_compile.patch +++ b/package/zlib/patches/100-cross_compile.patch @@ -1,7 +1,6 @@ -diff -ruN zlib-1.2.3-orig/Makefile.in zlib-1.2.3-2/Makefile.in ---- zlib-1.2.3-orig/Makefile.in 2004-09-15 16:27:20.000000000 +0200 -+++ zlib-1.2.3-2/Makefile.in 2004-11-13 13:38:12.000000000 +0100 -@@ -25,20 +25,23 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -25,20 +25,23 @@ CFLAGS=-O # -Wstrict-prototypes -Wmissing-prototypes LDFLAGS=libz.a @@ -28,7 +27,7 @@ diff -ruN zlib-1.2.3-orig/Makefile.in zlib-1.2.3-2/Makefile.in prefix = /usr/local exec_prefix = ${prefix} libdir = ${exec_prefix}/lib -@@ -67,8 +70,8 @@ +@@ -67,8 +70,8 @@ test: all echo ' *** zlib test FAILED ***'; \ fi @@ -39,7 +38,7 @@ diff -ruN zlib-1.2.3-orig/Makefile.in zlib-1.2.3-2/Makefile.in -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 match.o: match.S -@@ -77,8 +80,10 @@ +@@ -77,8 +80,10 @@ match.o: match.S mv _match.o match.o rm -f _match.s @@ -51,7 +50,7 @@ diff -ruN zlib-1.2.3-orig/Makefile.in zlib-1.2.3-2/Makefile.in rm -f $(SHAREDLIB) $(SHAREDLIBM) ln -s $@ $(SHAREDLIB) ln -s $@ $(SHAREDLIBM) -@@ -90,23 +95,23 @@ +@@ -90,23 +95,22 @@ minigzip$(EXE): minigzip.o $(LIBS) $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) install: $(LIBS) @@ -78,7 +77,7 @@ diff -ruN zlib-1.2.3-orig/Makefile.in zlib-1.2.3-2/Makefile.in rm -f $(SHAREDLIB) $(SHAREDLIBM); \ ln -s $(SHAREDLIBV) $(SHAREDLIB); \ ln -s $(SHAREDLIBV) $(SHAREDLIBM); \ - (ldconfig || true) >/dev/null 2>&1; \ +- (ldconfig || true) >/dev/null 2>&1; \ fi - cp zlib.3 $(man3dir) - chmod 644 $(man3dir)/zlib.3 @@ -87,10 +86,9 @@ diff -ruN zlib-1.2.3-orig/Makefile.in zlib-1.2.3-2/Makefile.in # The ranlib in install is needed on NeXTSTEP which checks file times # ldconfig is for Linux -diff -ruN zlib-1.2.3-orig/configure zlib-1.2.3-2/configure ---- zlib-1.2.3-orig/configure 2004-09-07 07:50:06.000000000 +0200 -+++ zlib-1.2.3-2/configure 2004-11-13 12:37:43.000000000 +0100 -@@ -23,7 +23,7 @@ +--- a/configure ++++ b/configure +@@ -23,7 +23,7 @@ LDFLAGS="-L. ${LIBS}" VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h` VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h` VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h` @@ -99,16 +97,42 @@ diff -ruN zlib-1.2.3-orig/configure zlib-1.2.3-2/configure RANLIB=${RANLIB-"ranlib"} prefix=${prefix-/usr/local} exec_prefix=${exec_prefix-'${prefix}'} -@@ -73,7 +73,7 @@ +@@ -73,32 +73,9 @@ esac if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then CC="$cc" - SFLAGS=${CFLAGS-"-fPIC -O3"} + SFLAGS=${CFLAGS-"-D_REENTRANT -fPIC -O3"} CFLAGS="$cflags" - case `(uname -s || echo unknown) 2>/dev/null` in - Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};; -@@ -408,6 +408,29 @@ +- case `(uname -s || echo unknown) 2>/dev/null` in +- Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};; +- CYGWIN* | Cygwin* | cygwin* | OS/2* ) +- EXE='.exe';; +- QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4 +- # (alain.bonnefoy@icbt.com) +- LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"};; +- HP-UX*) +- LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"} +- case `(uname -m || echo unknown) 2>/dev/null` in +- ia64) +- shared_ext='.so' +- SHAREDLIB='libz.so';; +- *) +- shared_ext='.sl' +- SHAREDLIB='libz.sl';; +- esac;; +- Darwin*) shared_ext='.dylib' +- SHAREDLIB=libz$shared_ext +- SHAREDLIBV=libz.$VER$shared_ext +- SHAREDLIBM=libz.$VER1$shared_ext +- LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER"};; +- *) LDSHARED=${LDSHARED-"$cc -shared"};; +- esac ++ LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"} + else + # find system name and corresponding cc options + CC=${CC-cc} +@@ -424,6 +401,29 @@ else echo Checking for mmap support... No. fi @@ -138,7 +162,7 @@ diff -ruN zlib-1.2.3-orig/configure zlib-1.2.3-2/configure CPP=${CPP-"$CC -E"} case $CFLAGS in *ASMV*) -@@ -424,20 +447,21 @@ +@@ -440,20 +440,21 @@ rm -f $test.[co] $test $test$shared_ext # udpate Makefile sed < Makefile.in " /^CC *=/s#=.*#=$CC# @@ -176,9 +200,8 @@ diff -ruN zlib-1.2.3-orig/configure zlib-1.2.3-2/configure +/^mandir *=/s%=.*%= $mandir% +/^LDFLAGS *=/s%=.*%= $LDFLAGS% " > Makefile -diff -ruN zlib-1.2.3-orig/contrib/minizip/Makefile zlib-1.2.3-2/contrib/minizip/Makefile ---- zlib-1.2.3-orig/contrib/minizip/Makefile 2003-09-10 20:00:16.000000000 +0200 -+++ zlib-1.2.3-2/contrib/minizip/Makefile 2004-11-13 12:37:43.000000000 +0100 +--- a/contrib/minizip/Makefile ++++ b/contrib/minizip/Makefile @@ -1,8 +1,8 @@ CC=cc -CFLAGS=-O -I../.. @@ -191,7 +214,7 @@ diff -ruN zlib-1.2.3-orig/contrib/minizip/Makefile zlib-1.2.3-2/contrib/minizip/ .c.o: $(CC) -c $(CFLAGS) $*.c -@@ -10,10 +10,10 @@ +@@ -10,10 +10,10 @@ ZIP_OBJS = minizip.o zip.o ioapi.o ../ all: miniunz minizip miniunz: $(UNZ_OBJS)