cygwin shared rules update [from HEAD].
authorAndy Polyakov <appro@openssl.org>
Sat, 19 May 2007 19:41:28 +0000 (19:41 +0000)
committerAndy Polyakov <appro@openssl.org>
Sat, 19 May 2007 19:41:28 +0000 (19:41 +0000)
PR: 1517

Makefile.shared

index 700d87ace7dd111b531e0f69b0582250662f4dbd..cb189a434ce672f62f4e541cc9ae97d862302a03 100644 (file)
@@ -236,24 +236,30 @@ link_o.cygwin:
        @ $(CALC_VERSIONS); \
        INHIBIT_SYMLINKS=yes; \
        SHLIB=cyg$(LIBNAME); \
-       expr $(PLATFORM) : 'mingw' > /dev/null && SHLIB=$(LIBNAME)eay32; \
+       base=-Wl,--enable-auto-image-base; \
+       if expr $(PLATFORM) : 'mingw' > /dev/null; then \
+               SHLIB=$(LIBNAME)eay32; base=; \
+       fi; \
        SHLIB_SUFFIX=.dll; \
        LIBVERSION="$(LIBVERSION)"; \
        SHLIB_SOVER=${LIBVERSION:+"-$(LIBVERSION)"}; \
        ALLSYMSFLAGS='-Wl,--whole-archive'; \
        NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
-       SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a"; \
+       SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a"; \
        $(LINK_SO_O)
 link_a.cygwin:
        @ $(CALC_VERSIONS); \
        INHIBIT_SYMLINKS=yes; \
        SHLIB=cyg$(LIBNAME); \
-       expr $(PLATFORM) : 'mingw' > /dev/null && SHLIB=$(LIBNAME)eay32; \
+       base=-Wl,--enable-auto-image-base; \
+       if expr $(PLATFORM) : 'mingw' > /dev/null; then \
+               SHLIB=$(LIBNAME)eay32; \
+               base=;  [ $(LIBNAME) = "crypto" ] && base=-Wl,--image-base,0x63000000; \
+       fi; \
        SHLIB_SUFFIX=.dll; \
        SHLIB_SOVER=-$(LIBVERSION); \
        ALLSYMSFLAGS='-Wl,--whole-archive'; \
        NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
-       base=;  [ $(LIBNAME) = "crypto" ] && base=-Wl,--image-base,0x63000000; \
        SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a"; \
        [ -f apps/$$SHLIB$$SHLIB_SUFFIX ] && rm apps/$$SHLIB$$SHLIB_SUFFIX; \
        [ -f test/$$SHLIB$$SHLIB_SUFFIX ] && rm test/$$SHLIB$$SHLIB_SUFFIX; \