Hi Steve,

I am working intensively with the openssl for Tru64, on shared libraries, I obtained 
success (the best time results) using the following shell script:

#!/bin/sh
# osf.sh -  Shared libraries assembly for DEC ALPHA OSF/1 formely Tru64
# 02/22/2000 by Jose Roberto Fernandes ([EMAIL PROTECTED])
#
HOME=..
EX_LIBS="-lc"
LFLAGS="-shared -std1 -O4 -msym -s -no_archive"
LIBDIR=/usr/opt/openssl/lib

SO_LOCATIONS=$HOME/so_locations

MAJOR=0
MINOR=9.5
COMPT=9
SHVERSION=${MAJOR}.$MINOR:$MAJOR.$COMPT

SHLIBCRYPTO=libcrypto.so
SHLIBSSL=libssl.so

DLIBCRYPTO=$HOME/libcrypto.a
DLIBSSL=$HOME/libssl.a

echo linking $SHLIBCRYPTO.$MAJOR.$MINOR
rm -f $HOME/$SHLIBCRYPTO.$MAJOR.$MINOR
ld $LFLAGS -set_version $SHVERSION -update_registry $SO_LOCATIONS -soname $SHLIBCRYPTO 
\
-o $HOME/$SHLIBCRYPTO.$MAJOR.$MINOR -all $DLIBCRYPTO -none $EX_LIBS

echo linking $SHLIBSSL.$MAJOR.$MINOR
rm -f $SHLIBSSL
rm -f $SHLIBSSL.$MAJOR.$MINOR
ld $LFLAGS -set_version $SHVERSION -update_registry $SO_LOCATIONS -soname $SHLIBSSL \
-o $HOME/$SHLIBSSL.$MAJOR.$MINOR -expect_unresolved \* -all $DLIBSSL -none $EX_LIBS

# echo copying libraries to final destination
# cp $HOME/$SHLIBCRYPTO.$MAJOR.$MINOR $LIBDIR
# cp $HOME/$SHLIBSSL.$MAJOR.$MINOR $LIBDIR

Notice that:

Is not recommended (you need to verify in case), but I used the highest optimization 
independent level (O4).
I also set up the public symbols entries table in the own library (-msym) saving work 
for the loader and reducing the dynamic memory allocation on-the-fly.

Even so I didn't reach the results obtained with openssl speed when I use archives!
A small performance difference can be measured in some digests.

We needed to test the optimization cluster level -fast (using V5 compiler) and
-unsigned. This last one will allow better optimização of instructions with the type 
unsigned char that aren´t  possible with char. If none math operations is present 
using this data type (char) we will still improve more
performance.

Don't I know if works, need more tests ...

Steve VanDevender wrote:

> The below diff to the OpenSSL 0.9.4 Makefile.org adds rules for building
> shared library versions of OpenSSL on Solaris and Digital UNIX (formerly
> OSF/1, now Compaq Tru64 UNIX).  When linked against these shared
> libraries the test suite passes all tests and I am successfully using
> the shared libraries in production.
>
> solaris-gcc-shared: builds Solaris ELF shared library with gcc
>
> solaris-cc-shared: builds Solaris ELF shared library with Sun Workshop cc
>
> osf-cc-shared: builds COFF shared library with Digital UNIX C compiler
> (includes appropriate options for COFF shared library version
> information)
>
> Linkers other than GNU ld don't appear to have equivalents to the
> --with-whole-archive option, so these rules extract the .o files from
> the .a files created by the usual build process into openssl-0.9.4/tmp,
> and link those to create the shared libraries.
>
> --- openssl-0.9.4/Makefile.org~ Sun Aug  8 03:29:52 1999
> +++ openssl-0.9.4/Makefile.org  Wed Feb 23 13:52:35 2000
> @@ -206,6 +206,55 @@
>         ln -s lib$$i.so.${MAJOR} lib$$i.so; \
>         done;
>
> +solaris-gcc-shared:
> +       for i in ${SHLIBDIRS}; do \
> +       rm -f lib$$i.a lib$$i.so \
> +               lib$$i.so.${MAJOR} lib$$i.so.${MAJOR}.${MINOR}; \
> +       ${MAKE} CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='-fPIC ${CFLAG}' 
>SDIRS='${SDIRS}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' 
>EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' 
>CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' 
>SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' 
>RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' DIRS=$$i clean all || exit 1; \
> +       ( set -x; rm -f tmp/*.o; cd tmp; ar x ../lib$$i.a; cd ..; \
> +               ${CC}  -shared -o lib$$i.so.${MAJOR}.${MINOR} \
> +               -Wl,-h,lib$$i.so.${MAJOR} tmp/*.o ;\
> +               rm -f tmp/*.o ) || exit 1; \
> +       rm -f lib$$i.a; make -C $$i clean || exit 1 ;\
> +       done;
> +       @set -x; \
> +       for i in ${SHLIBDIRS}; do \
> +       ln -s lib$$i.so.${MAJOR}.${MINOR} lib$$i.so.${MAJOR}; \
> +       ln -s lib$$i.so.${MAJOR} lib$$i.so; \
> +       done;
> +
> +solaris-cc-shared:
> +       for i in ${SHLIBDIRS}; do \
> +       rm -f lib$$i.a lib$$i.so \
> +               lib$$i.so.${MAJOR} lib$$i.so.${MAJOR}.${MINOR}; \
> +       ${MAKE} CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='-KPIC ${CFLAG}' 
>SDIRS='${SDIRS}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' 
>EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' 
>CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' 
>SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' 
>RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' DIRS=$$i clean all || exit 1; \
> +       ( set -x; rm -f tmp/*.o; cd tmp; ar x ../lib$$i.a; cd ..; \
> +               ${CC} -G -KPIC ${CFLAG} -o lib$$i.so.${MAJOR}.${MINOR} \
> +               -h lib$$i.so.${MAJOR} tmp/*.o \
> +               -lc; rm -f tmp/*.o ) || exit 1; \
> +       rm -f lib$$i.a; make -C $$i clean || exit 1 ;\
> +       done;
> +       @set -x; \
> +       for i in ${SHLIBDIRS}; do \
> +       ln -s lib$$i.so.${MAJOR}.${MINOR} lib$$i.so.${MAJOR}; \
> +       ln -s lib$$i.so.${MAJOR} lib$$i.so; \
> +       done;
> +
> +osf-cc-shared:
> +       for i in ${SHLIBDIRS}; do \
> +       rm -f lib$$i.so lib$$i.so.${MAJOR} lib$$i.so.${MAJOR}.${MINOR}; \
> +       ${MAKE} CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='${SDIRS}' 
>INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' 
>BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' 
>RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' 
>MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' DIRS=$$i 
>all || exit 1; \
> +       ( set -x; rm -f tmp/*.o; cd tmp; ar x ../lib$$i.a; cd ..;\
> +               ${CC}  -shared -o lib$$i.so.${MAJOR}.${MINOR} \
> +               -soname lib$$i.so -set_version ${MAJOR}.${MINOR} tmp/*.o ;\
> +               rm -f tmp/*.o ) || exit 1;\
> +       done;
> +       @set -x; \
> +       for i in ${SHLIBDIRS}; do \
> +       ln -s lib$$i.so.${MAJOR}.${MINOR} lib$$i.so.${MAJOR}; \
> +       ln -s lib$$i.so.${MAJOR} lib$$i.so; \
> +       done;
> +
>  Makefile.ssl: Makefile.org
>         @echo "Makefile.ssl is older than Makefile.org."
>         @echo "Reconfigure the source tree (via './config' or 'perl Configure'), 
>please."
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [EMAIL PROTECTED]
> Automated List Manager                           [EMAIL PROTECTED]
begin:vcard 
n:Fernandes;Jose Roberto
tel;fax:+5511 2537000
tel;work:+5511 2537000
x-mozilla-html:FALSE
url:www.bc-ip.com.br
org:Genius Software Ltda;DBMS Lab. Sao Paulo
version:2.1
email;internet:[EMAIL PROTECTED]
title:BC-IP Network Manager
adr;quoted-printable:;;Av. Paulista, 807 CJ 902=0D=0A;Sao Paulo;SP;01311-100;Brasil
x-mozilla-cpt:;0
fn:Jose Roberto Fernandes
end:vcard

Reply via email to