Here's a patch that provides old style shared library (libname_shr.a)
support for AIX, at least it's needed in our environment for some software
compilations. The patch also removes some old and not so up-to-date
comments about linking flags used for various platforms.

-Antti

diff -ruN openssl-0.9.7b.orig/Configure openssl-0.9.7b/Configure
--- openssl-0.9.7b.orig/Configure       2003-04-10 08:46:55.000000000 +0300
+++ openssl-0.9.7b/Configure    2003-08-19 12:58:21.000000000 +0300
@@ -442,8 +442,10 @@

 # IBM's AIX.
 "aix-cc",   "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::",
+"aix-cc-archive",   "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG 
RC4_CHAR::::::::::dlfcn:aix-shared-archive:::_shr.a::",
 "aix-gcc",  "gcc:-O3 -DB_ENDIAN::(unknown):AIX::BN_LLONG RC4_CHAR:::",
 "aix43-cc",   "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384::(unknown):::BN_LLONG 
RC4_CHAR::::::::::dlfcn:aix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::",
+"aix43-cc-archive",   "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384::(unknown):::BN_LLONG 
RC4_CHAR::::::::::dlfcn:aix-shared-archive:::_shr.a::",
 "aix43-gcc",  "gcc:-O1 -DAIX -DB_ENDIAN::(unknown):::BN_LLONG 
RC4_CHAR::::::::::dlfcn:",
 "aix64-cc",   "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384 
-q64::(unknown):::SIXTY_FOUR_BIT_LONG 
RC4_CHAR::::::::::dlfcn:aix-shared::-q64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64",

diff -ruN openssl-0.9.7b.orig/Makefile.org openssl-0.9.7b/Makefile.org
--- openssl-0.9.7b.orig/Makefile.org    2003-04-08 14:54:32.000000000 +0300
+++ openssl-0.9.7b/Makefile.org 2003-08-19 12:56:42.000000000 +0300
@@ -510,53 +510,34 @@
        chmod a=rx lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
        done

-# The following method is said to work on all platforms.  Tests will
-# determine if that's how it's gong to be used.
-# This assumes that for all but GNU systems, GNU utilities are *not* used.
-# ALLSYMSFLAGS would be:
-#  GNU systems: --whole-archive
-#  Tru64 Unix:  -all
-#  Solaris:     -z allextract
-#  Irix:        -all
-#  HP/UX-32bit: -Fl
-#  HP/UX-64bit: +forceload
-#  AIX:                -bnogc
-# SHAREDFLAGS would be:
-#  GNU systems: -shared -Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
-#  Tru64 Unix:  -shared \
-#              -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}"
-#  Solaris:     -G -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
-#  Irix:        -shared -Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
-#  HP/UX-32bit: +vnocompatwarnings -b -z +s \
-#              +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}
-#  HP/UX-64bit: -b -z +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}
-#  AIX:                -G -bE:lib$$i.exp -bM:SRE
-# SHAREDCMD would be:
-#  GNU systems: $(CC)
-#  Tru64 Unix:  $(CC)
-#  Solaris:     $(CC)
-#  Irix:        $(CC)
-#  HP/UX-32bit: /usr/ccs/bin/ld
-#  HP/UX-64bit: /usr/ccs/bin/ld
-#  AIX:                $(CC)
-ALLSYMSFLAG=-bnogc
-SHAREDFLAGS=${SHARED_LDFLAGS} -G -bE:lib$$i.exp -bM:SRE
-SHAREDCMD=$(CC)
 do_aix-shared:
        libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
        if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
                libs="$(LIBKRB5) $$libs"; \
        fi; \
        ( set -x; \
-         ld -r -o lib$$i.o $(ALLSYMSFLAG) lib$$i.a && \
+         ld -r -o lib$$i.o -bnogc lib$$i.a && \
          ( nm -Pg lib$$i.o | grep ' [BD] ' | cut -f1 -d' ' > lib$$i.exp; \
-           $(SHAREDCMD) $(SHAREDFLAGS) \
+           $(CC) ${SHARED_LDFLAGS} -G -bE:lib$$i.exp -bM:SRE \
                -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} lib$$i.o \
                $$libs ${EX_LIBS} ) ) \
        || exit 1; \
        libs="-l$$i $$libs"; \
        done

+do_aix-shared-archive:
+       libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
+       if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
+               libs="$(LIBKRB5) $$libs"; \
+       fi; \
+       ( set -x; \
+           $(CC) ${SHARED_LDFLAGS} -G \
+               -o lib$${i}${SHLIB_EXT} lib$$i.a \
+               $$libs ${EX_LIBS} -lc ) \
+       || exit 1; \
+       libs="-l$$i $$libs"; \
+       done
+
 do_reliantunix-shared:
        libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
        if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to