Because it's one of our libraries calling new functions in the other,
[openssl.git] / Makefile.shared
index f817d126d3d07d043e3ece09032fcd2d7008c0a8..81a72a4738d7c42a2461979ea5bf186e8a05d182 100644 (file)
@@ -583,78 +583,47 @@ link_app.irix:
        fi; \
        $(LINK_APP)
 
-# HP-UX includes the full pathname of libs we depend on, so we would get
-# ./libcrypto (with ./ as path information) compiled into libssl, hence
-# we omit the SHLIBDEPS. Applications must be linked with -lssl -lcrypto
-# anyway.
-# The object modules are loaded from lib$i.a using the undocumented -Fl
-# option.
+# 32-bit PA-RISC HP-UX embeds the -L pathname of libs we link with, so
+# we compensate for it with +cdp ../: and +cdp ./:. Yes, these rewrite
+# rules imply that we can only link one level down in catalog structure,
+# but that's what takes place for the moment of this writing. +cdp option
+# was introduced in HP-UX 11.x and applies in 32-bit PA-RISC link
+# editor context only [it's simply ignored in other cases, which are all
+# ELFs by the way].
 #
-# WARNING: Until DSO is fixed to support a search path, we support SHLIB_PATH
-#          by temporarily specifying "+s"!
-#
-link_o.hpux32:
-       @ $(CALC_VERSIONS); \
+link_o.hpux:
+       @if ${DETECT_GNU_LD}; then $(DO_GNU_SO); else \
+       $(CALC_VERSIONS); \
        SHLIB=lib$(LIBNAME).sl; \
        SHLIB_SUFFIX=; \
        LIBDEPS="$(LIBDEPS)"; \
        ALLSYMSFLAGS='-Wl,-Fl'; \
        NOALLSYMSFLAGS=''; \
-       expr $(PLATFORM) : '.*64' > /dev/null && ALLSYMFLAGS='-Wl,+forceload'; \
-       SHAREDFLAGS="-Wl,+vnocompatwarnings,-z,+s,+h,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX,+b,$(LIBRPATH)"; \
+       expr $(PLATFORM) : 'hpux64' > /dev/null && ALLSYMSFLAGS='-Wl,+forceload'; \
+       SHAREDFLAGS="-Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+cdp,../:,+cdp,./:,+h,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX,+b,$(LIBRPATH)"; \
        SHAREDCMD=$(CC); \
+       fi; \
        $(LINK_SO_O) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
-link_a.hpux32:
-       @ $(CALC_VERSIONS); \
+link_a.hpux:
+       @if ${DETECT_GNU_LD}; then $(DO_GNU_SO); else \
+       $(CALC_VERSIONS); \
        SHLIB=lib$(LIBNAME).sl; \
        SHLIB_SUFFIX=; \
        LIBDEPS="$(LIBDEPS)"; \
        ALLSYMSFLAGS='-Wl,-Fl'; \
        NOALLSYMSFLAGS=''; \
-       expr $(PLATFORM) : '.*64' > /dev/null && ALLSYMFLAGS='-Wl,+forceload'; \
-       SHAREDFLAGS="-Wl,+vnocompatwarnings,-z,+s,+h,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX,+b,$(LIBRPATH)"; \
+       expr $(PLATFORM) : 'hpux64' > /dev/null && ALLSYMSFLAGS='-Wl,+forceload'; \
+       SHAREDFLAGS="-Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+cdp,../:,+cdp,./:,+h,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX,+b,$(LIBRPATH)"; \
        SHAREDCMD='$(CC)'; \
+       fi; \
        $(LINK_SO_A) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
-link_app.hpux32:
+link_app.hpux:
+       @if ${DETECT_GNU_LD}; then $(DO_GNU_APP); else \
        LDCMD=$(CC);\
-       LDFLAGS="-Wl,+b,$(LIBRPATH)"; \
+       LDFLAGS="-Wl,+s,+cdp,../:,+cdp,./:,+b,$(LIBRPATH)"; \
        LIBDEPS="$(LIBDEPS)"; \
        APPNAME="$(APPNAME)"; \
-       $(LINK_APP)
-
-# HP-UX includes the full pathname of libs we depend on, so we would get
-# ./libcrypto (with ./ as path information) compiled into libssl, hence
-# we omit the SHLIBDEPS. Applications must be linked with -lssl -lcrypto
-# anyway.
-#
-# HP-UX in 64bit mode has "+s" enabled by default; it will search for
-# shared libraries along LD_LIBRARY_PATH _and_ SHLIB_PATH.
-#
-link_o.hpux64:
-       @ $(CALC_VERSIONS); \
-       SHLIB=lib$(LIBNAME).sl; \
-       SHLIB_SUFFIX=; \
-       LIBDEPS="$(LIBDEPS) -lc"; \
-       ALLSYMSFLAGS='+forceload'; \
-       NOALLSYMSFLAGS=''; \
-       SHAREDFLAGS="-b -z +h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX +b $(LIBRPATH)"; \
-       SHAREDCMD='/usr/ccs/bin/ld'; \
-       $(LINK_SO_O) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
-link_a.hpux64:
-       @ $(CALC_VERSIONS); \
-       SHLIB=lib$(LIBNAME).sl; \
-       SHLIB_SUFFIX=; \
-       LIBDEPS="$(LIBDEPS) -lc"; \
-       ALLSYMSFLAGS='+forceload'; \
-       NOALLSYMSFLAGS=''; \
-       SHAREDFLAGS="-b -z +h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX +b $(LIBRPATH)"; \
-       SHAREDCMD='/usr/ccs/bin/ld'; \
-       $(LINK_SO_A) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
-link_app.hpux64:
-       LDCMD=$(CC);\
-       LDFLAGS="-Wl,+b,$(LIBRPATH)"; \
-       LIBDEPS="$(LIBDEPS) -lc"; \
-       APPNAME="$(APPNAME)"
+       fi; \
        $(LINK_APP)
 
 link_o.aix:
@@ -722,7 +691,7 @@ symlink.darwin:
        SHLIB=lib$(LIBNAME); \
        SHLIB_SUFFIX=.dylib; \
        $(SYMLINK_SO)
-symlink.hpux32 symlink.hpux64:
+symlink.hpux:
        @ $(CALC_VERSIONS); \
        SHLIB=lib$(LIBNAME).sl; \
        $(SYMLINK_SO)
@@ -770,14 +739,10 @@ link_o.irix-shared: link_o.irix
 link_a.irix-shared: link_a.irix
 link_app.irix-shared: link_app.irix
 symlink.irix-shared: symlink.irix
-link_o.hpux-shared: link_o.hpux32
-link_a.hpux-shared: link_a.hpux32
-link_app.hpux-shared: link_app.hpux32
-symlink.hpux-shared: symlink.hpux32
-link_o.hpux64-shared: link_o.hpux64
-link_a.hpux64-shared: link_a.hpux64
-link_app.hpux64-shared: link_app.hpux64
-symlink.hpux64-shared: symlink.hpux64
+link_o.hpux-shared: link_o.hpux
+link_a.hpux-shared: link_a.hpux
+link_app.hpux-shared: link_app.hpux
+symlink.hpux-shared: symlink.hpux
 link_o.aix-shared: link_o.aix
 link_a.aix-shared: link_a.aix
 link_app.aix-shared: link_app.aix