On Fri, Oct 13, 2000 at 02:40:33PM +0200, Richard Levitte - VMS Whacker wrote:
> From: Albert Chin-A-Young <[EMAIL PROTECTED]>
>
> china> I'm building OpenSSL 0.9.6 with shared libraries for Solaris, HP-UX,
> china> IRIX, and Digital UNIX. HP-UX and IRIX are not currently supported so
> china> we'll be adding support. A few questions though:
> china> 1. Any reason libtool was not chosen?
>
> All developers that have voiced any opinion are of the opinion that
> it's a pain in the butt to use...
I won't beat a dead horse then.
> china> 2. Looking at ./Configure, it's impossible to build shared
> china> libraries on systems whose C compiler doesn't have a separate
> china> flag for generating PIC code. I'm speaking of the following
> china> snippet in ./Configure:
> [...]
> china> if ($shared_cflag ne "")
> [...]
> china> On IRIX and Digital UNIX, the vendor C compilers do not
> china> need a flag to generate PIC code. I think it would be
> china> better if the first if was:
> china> if ($shared_target ne "")
>
> I've done that change and many others. Hopefully, the shared library
> build will be a little more flexible and much less clumsy.
>
> china> 3. The following code from Makefile.org does not work correctly to
> china> install a shared library (tested under Solaris 8):
> china> install: all install_docs
>
> I've fixed that as part of the changes I've made around shared library
> build support...
>
> To be commited soon.
I've attached the patch I'm working with at the moment. It's a work in
progress. The patch adds support for building shared libraries on
IRIX.
A downside is that it creates the symbolic links (libssl.so and
libsso.so.0) at 'make install' time. This means that no binaries can
be linked against the shared libraries during a build. This is not
such a bad thing though. Linking a binary against a shared library is
not so simple. If you plan to do this, let me know because more
"magick" will need to be done. I hope it is not necessary though as
life will be so much simpler without doing this.
Also, why do you '-L. -lcrypto' when building libssl.so? The shared
library version of libssl should mimick the static version.
--
albert chin ([EMAIL PROTECTED])
-- snip snip
--- Configure.orig Tue Sep 26 02:09:15 2000
+++ Configure Fri Oct 13 00:15:13 2000
@@ -179,7 +179,7 @@
# './Configure irix-[g]cc' manually.
# -mips4 flag is added by ./config when appropriate.
"irix-mips3-gcc","gcc:-mabi=n32 -mmips-as -O3 -DTERMIOS -DB_ENDIAN
-DBN_DIV3W::-D_SGI_MP_SOURCE::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL
DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:asm/mips3.o::",
-"irix-mips3-cc", "cc:-n32 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN
-DBN_DIV3W::-D_SGI_MP_SOURCE::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL
BF_PTR SIXTY_FOUR_BIT:asm/mips3.o::",
+"irix-mips3-cc", "cc:-n32 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN
+-DBN_DIV3W::-D_SGI_MP_SOURCE::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL
+BF_PTR SIXTY_FOUR_BIT:asm/mips3.o:::::::::dlfcn:irix-shared",
# N64 ABI builds.
"irix64-mips4-gcc","gcc:-mabi=64 -mips4 -mmips-as -O3 -DTERMIOS -DB_ENDIAN
-DBN_DIV3W::-D_SGI_MP_SOURCE::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL
SIXTY_FOUR_BIT_LONG:asm/mips3.o::",
"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN
-DBN_DIV3W::-D_SGI_MP_SOURCE::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL
SIXTY_FOUR_BIT_LONG:asm/mips3.o::",
@@ -710,7 +710,7 @@
# You will find shlib_mark1 and shlib_mark2 explained in Makefile.org
my $shared_mark1 = "";
my $shared_mark2 = "";
-if ($shared_cflag ne "")
+if ($shared_target ne "")
{
$cflags = "$shared_cflag $cflags";
if (!$no_shared)
@@ -825,7 +825,7 @@
s/^SHLIB_TARGET=.*/SHLIB_TARGET=$shared_target/;
s/^SHLIB_MARK1=.*/SHLIB_MARK1=$shared_mark1/;
s/^SHLIB_MARK2=.*/SHLIB_MARK2=$shared_mark2/;
- s/^LIBS=.*/LIBS=libcrypto\.so\* libssl\.so\*/ if (!$no_shared);
+ s/^LIBS=.*/LIBS=libcrypto\.so libssl\.so/ if (!$no_shared);
print OUT $_."\n";
}
close(IN);
--- Makefile.org.orig Thu Oct 12 18:06:23 2000
+++ Makefile.org Fri Oct 13 06:28:44 2000
@@ -256,42 +256,43 @@
linux-shared:
libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
- rm -f lib$$i.so \
- lib$$i.so.${SHLIB_MAJOR} \
- lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
+ rm -f lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
( set -x; ${CC} -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
-Wl,-S,-soname=lib$$i.so.${SHLIB_MAJOR} \
-Wl,--whole-archive lib$$i.a \
- -Wl,--no-whole-archive $$libs ${EX_LIBS} -lc ) || exit 1; \
+ -Wl,--no-whole-archive ${EX_LIBS} ) || exit 1; \
+ libs="$$libs -L. -l$$i"; \
+ done
+
+irix-shared:
+ libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
+ rm -f lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
+ ( set -x; ${CC} -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
+ -Wl,-soname,lib$$i.so.${SHLIB_MAJOR} \
+ -all lib$$i.a ${EX_LIBS}) || exit 1; \
libs="$$libs -L. -l$$i"; \
- ( set -x; \
- ln -s lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
- lib$$i.so.${SHLIB_MAJOR}; \
- ln -s lib$$i.so.${SHLIB_MAJOR} lib$$i.so ); \
done
# This assumes that GNU utilities are *not* used
true64-shared:
libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
- ( set -x; ${CC} -shared -no_archive -o lib$$i.so \
- -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
- -all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
+ rm -f lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
+ ( set -x; ${CC} -shared -no_archive \
+ -Wl,-expect_unresolved,"*" \
+ -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
+ -set_version "${SHLIB_MAJOR}:${SHLIB_MAJOR}.${SHLIB_MINOR}" \
+ -all lib$$i.a -none ${EX_LIBS} ) || exit 1; \
libs="$$libs -L. -l$$i"; \
done
# This assumes that GNU utilities are *not* used
solaris-shared:
libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
- rm -f lib$$i.so \
- lib$$i.so.${SHLIB_MAJOR} \
- lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
+ rm -f lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
( set -x; ${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
-h lib$$i.so.${SHLIB_MAJOR} \
- -z allextract lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \
+ -z allextract lib$$i.a ${EX_LIBS} ) || exit 1; \
libs="$$libs -L. -l$$i"; \
- ln -s lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
- lib$$i.so.${SHLIB_MAJOR}; \
- ln -s lib$$i.so.${SHLIB_MAJOR} lib$$i.so; \
done
Makefile.ssl: Makefile.org
@@ -459,11 +460,32 @@
done
@for i in $(LIBS) ;\
do \
- if [ -f "$$i" ]; then \
- ( echo installing $$i; \
- cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
- $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
- chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
+ lib="$$i.${SHLIB_MAJOR}.${SHLIB_MINOR}"; \
+ if [ -f "$$lib" ]; then \
+ ( echo installing $$lib; \
+ cp $$lib $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
+ case "$$i" in \
+ *.a) \
+ $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$lib; \
+ chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$lib; \
+ ;; \
+ *.so) \
+ ( set -x; \
+ ln -s ./$$lib \
+
+$(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.${SHLIB_MAJOR}; \
+ ln -s ./$$i.${SHLIB_MAJOR} \
+ $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
+ chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$lib; \
+ ;; \
+ *.sl) \
+ ( set -x; \
+ ln -s ./$$lib \
+
+$(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.${SHLIB_MAJOR}; \
+ ln -s ./$$i.${SHLIB_MAJOR} \
+ $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
+ chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$lib; \
+ ;; \
+ esac ); \
fi \
done
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]