Big rename fest of engine DSO names, from libFOO.so to FOO.so

The engine DSOs were named as if they were shared libraries, and could
end up having all sorts of fancy names:

  Cygwin: cygFOO.dll
  Mingw:  FOOeay32.dll
  Unix:   libFOO.so / libFOO.sl / libFOO.dylib / ...

This may be confusing, since they look like libraries one should link
with at link time, when they're just DSOs.

It's therefore time to rename them, and do it consistently on all
platforms:

  Cygwin & Mingw: FOO.dll
  Unix:           FOO.{so,sl,dylib,...}

Interestingly enough, the MSVC and VMS builds always did it this way.

Reviewed-by: Andy Polyakov <appro@openssl.org>
This commit is contained in:
Richard Levitte 2016-02-15 18:29:09 +01:00
parent 24e75727bd
commit 9ee0ed3de6
4 changed files with 39 additions and 54 deletions

View File

@ -163,7 +163,7 @@ LINK_SO_SHLIB_UNPACKED= \
DETECT_GNU_LD=($(CC) -Wl,-V /dev/null 2>&1 | grep '^GNU ld' )>/dev/null DETECT_GNU_LD=($(CC) -Wl,-V /dev/null 2>&1 | grep '^GNU ld' )>/dev/null
DO_GNU_SO_NOCALC=\ DO_GNU_SO_NOCALC=\
SHLIB=lib$(LIBNAME).so; \ SHLIB=$(LIBNAME).so; \
SHLIB_SUFFIX=; \ SHLIB_SUFFIX=; \
ALLSYMSFLAGS='-Wl,--whole-archive'; \ ALLSYMSFLAGS='-Wl,--whole-archive'; \
NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
@ -194,7 +194,7 @@ link_shlib.linux-shared:
link_dso.bsd: link_dso.bsd:
@if $(DETECT_GNU_LD); then $(DO_GNU_SO_NOCALC); else \ @if $(DETECT_GNU_LD); then $(DO_GNU_SO_NOCALC); else \
SHLIB=lib$(LIBNAME).so; \ SHLIB=$(LIBNAME).so; \
SHLIB_SUFFIX=; \ SHLIB_SUFFIX=; \
LIBDEPS=" "; \ LIBDEPS=" "; \
ALLSYMSFLAGS="-Wl,-Bforcearchive"; \ ALLSYMSFLAGS="-Wl,-Bforcearchive"; \
@ -234,7 +234,7 @@ link_app.bsd:
# Alternative to this heuristic approach is to develop specific # Alternative to this heuristic approach is to develop specific
# MacOS X dso module relying on whichever "native" dyld interface. # MacOS X dso module relying on whichever "native" dyld interface.
link_dso.darwin: link_dso.darwin:
@ SHLIB=lib$(LIBNAME); \ @ SHLIB=$(LIBNAME); \
SHLIB_SUFFIX=.dylib; \ SHLIB_SUFFIX=.dylib; \
ALLSYMSFLAGS='-all_load'; \ ALLSYMSFLAGS='-all_load'; \
NOALLSYMSFLAGS=''; \ NOALLSYMSFLAGS=''; \
@ -259,20 +259,12 @@ link_app.darwin: # is there run-path on darwin?
$(LINK_APP) $(LINK_APP)
link_dso.cygwin: link_dso.cygwin:
INHIBIT_SYMLINKS=yes; \ @SHLIB=$(LIBNAME); \
SHLIB=cyg$(LIBNAME); \
base=-Wl,--enable-auto-image-base; \
deffile=; \
if expr $(PLATFORM) : 'mingw' > /dev/null; then \
SHLIB=$(LIBNAME)eay32; base=; \
if test -f $(LIBNAME)eay32.def; then \
deffile=$(LIBNAME)eay32.def; \
fi; \
fi; \
SHLIB_SUFFIX=.dll; \ SHLIB_SUFFIX=.dll; \
ALLSYMSFLAGS='-Wl,--whole-archive'; \ ALLSYMSFLAGS='-Wl,--whole-archive'; \
NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base $$deffile -Wl,-Bsymbolic"; \ base=-Wl,--enable-auto-image-base; \
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-Bsymbolic"; \
$(LINK_SO_DSO) $(LINK_SO_DSO)
#for mingw target if def-file is in use dll-name should match library-name #for mingw target if def-file is in use dll-name should match library-name
link_shlib.cygwin: link_shlib.cygwin:
@ -309,7 +301,7 @@ link_dso.alpha-osf1:
@ if $(DETECT_GNU_LD); then \ @ if $(DETECT_GNU_LD); then \
$(DO_GNU_SO_NOCALC); \ $(DO_GNU_SO_NOCALC); \
else \ else \
SHLIB=lib$(LIBNAME).so; \ SHLIB=$(LIBNAME).so; \
SHLIB_SUFFIX=; \ SHLIB_SUFFIX=; \
ALLSYMSFLAGS='-all'; \ ALLSYMSFLAGS='-all'; \
NOALLSYMSFLAGS='-none'; \ NOALLSYMSFLAGS='-none'; \
@ -384,7 +376,7 @@ link_dso.svr3:
$(DO_GNU_SO_NOCALC); \ $(DO_GNU_SO_NOCALC); \
else \ else \
$(CALC_VERSIONS); \ $(CALC_VERSIONS); \
SHLIB=lib$(LIBNAME).so; \ SHLIB=$(LIBNAME).so; \
SHLIB_SUFFIX=; \ SHLIB_SUFFIX=; \
ALLSYMSFLAGS=''; \ ALLSYMSFLAGS=''; \
NOALLSYMSFLAGS=''; \ NOALLSYMSFLAGS=''; \
@ -414,7 +406,7 @@ link_dso.svr5:
else \ else \
SHARE_FLAG='-G'; \ SHARE_FLAG='-G'; \
($(CC) -v 2>&1 | grep gcc) > /dev/null && SHARE_FLAG='-shared'; \ ($(CC) -v 2>&1 | grep gcc) > /dev/null && SHARE_FLAG='-shared'; \
SHLIB=lib$(LIBNAME).so; \ SHLIB=$(LIBNAME).so; \
SHLIB_SUFFIX=; \ SHLIB_SUFFIX=; \
ALLSYMSFLAGS=''; \ ALLSYMSFLAGS=''; \
NOALLSYMSFLAGS=''; \ NOALLSYMSFLAGS=''; \
@ -443,7 +435,7 @@ link_dso.irix:
@ if $(DETECT_GNU_LD); then \ @ if $(DETECT_GNU_LD); then \
$(DO_GNU_SO_NOCALC); \ $(DO_GNU_SO_NOCALC); \
else \ else \
SHLIB=lib$(LIBNAME).so; \ SHLIB=$(LIBNAME).so; \
SHLIB_SUFFIX=; \ SHLIB_SUFFIX=; \
MINUSWL=""; \ MINUSWL=""; \
($(CC) -v 2>&1 | grep gcc) > /dev/null && MINUSWL="-Wl,"; \ ($(CC) -v 2>&1 | grep gcc) > /dev/null && MINUSWL="-Wl,"; \
@ -480,7 +472,7 @@ link_app.irix:
# #
link_dso.hpux: link_dso.hpux:
@if $(DETECT_GNU_LD); then $(DO_GNU_SO_NOCALC); else \ @if $(DETECT_GNU_LD); then $(DO_GNU_SO_NOCALC); else \
SHLIB=lib$(LIBNAME).sl; \ SHLIB=$(LIBNAME).sl; \
expr "$(CFLAGS)" : '.*DSO_DLFCN' > /dev/null && SHLIB=lib$(LIBNAME).so; \ expr "$(CFLAGS)" : '.*DSO_DLFCN' > /dev/null && SHLIB=lib$(LIBNAME).so; \
SHLIB_SUFFIX=; \ SHLIB_SUFFIX=; \
ALLSYMSFLAGS='-Wl,-Fl'; \ ALLSYMSFLAGS='-Wl,-Fl'; \
@ -512,7 +504,7 @@ link_app.hpux:
link_dso.aix: link_dso.aix:
@OBJECT_MODE=`expr "x$(SHARED_LDFLAGS)" : 'x\-[a-z]*\(64\)'` || :; \ @OBJECT_MODE=`expr "x$(SHARED_LDFLAGS)" : 'x\-[a-z]*\(64\)'` || :; \
OBJECT_MODE=$${OBJECT_MODE:-32}; export OBJECT_MODE; \ OBJECT_MODE=$${OBJECT_MODE:-32}; export OBJECT_MODE; \
SHLIB=lib$(LIBNAME).so; \ SHLIB=$(LIBNAME).so; \
SHLIB_SUFFIX=; \ SHLIB_SUFFIX=; \
ALLSYMSFLAGS=''; \ ALLSYMSFLAGS=''; \
NOALLSYMSFLAGS=''; \ NOALLSYMSFLAGS=''; \

View File

@ -447,6 +447,8 @@ static int dynamic_load(ENGINE *e, dynamic_data_ctx *ctx)
if (!ctx->DYNAMIC_LIBNAME) { if (!ctx->DYNAMIC_LIBNAME) {
if (!ctx->engine_id) if (!ctx->engine_id)
return 0; return 0;
DSO_ctrl(ctx->dynamic_dso, DSO_CTRL_SET_FLAGS,
DSO_FLAG_NAME_TRANSLATION_EXT_ONLY, NULL);
ctx->DYNAMIC_LIBNAME = ctx->DYNAMIC_LIBNAME =
DSO_convert_filename(ctx->dynamic_dso, ctx->engine_id); DSO_convert_filename(ctx->dynamic_dso, ctx->engine_id);
} }

View File

@ -79,33 +79,24 @@ e_padlock-x86_64.s: asm/e_padlock-x86_64.pl
files: files:
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
# XXXXX This currently only works on systems that use .so as suffix
# for shared libraries as well as for Cygwin which uses the
# dlfcn_name_converter and therefore stores the engines with .so suffix, too.
# XXXXX This was extended to HP-UX dl targets, which use .sl suffix.
# XXXXX This was extended to mingw targets, which use eay32.dll suffix without lib as prefix.
install: install:
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
@if [ -n "$(SHARED_LIBS)" ]; then \ @if [ -n "$(SHARED_LIBS)" ]; then \
set -e; \ set -e; \
$(PERL) $(TOP)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines; \ $(PERL) $(TOP)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines; \
for l in $(LIBNAMES); do \ for l in $(LIBNAMES); do \
( echo installing $$l; \ cp $${l}$(DSO_EXT) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT).new; \
pfx=lib; \ chmod 555 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT).new; \
if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \ mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT).new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT); \
sfx=".so"; \ done; \
cp cyg$$l.dll $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \ fi
else \
case "$(CFLAGS)" in \ uninstall:
*DSO_DLFCN*) sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;; \ @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
*DSO_DL*) sfx=".sl";; \ @if [ -n "$(SHARED_LIBS)" ]; then \
*DSO_WIN32*) sfx="eay32.dll"; pfx=;; \ set -e; \
*) sfx=".bad";; \ for l in $(LIBNAMES); do \
esac; \ $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT); \
cp $$pfx$$l$$sfx $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
fi; \
chmod 555 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
done; \ done; \
fi fi

View File

@ -6,19 +6,19 @@ IF[{- $config{no_shared} -}]
e_capi.c \ e_capi.c \
e_dasync.c e_dasync.c
ELSE ELSE
ENGINES=libpadlock libcapi libdasync libossltest ENGINES=padlock capi dasync ossltest
SOURCE[libpadlock]=e_padlock.c {- $target{padlock_asm_src} -} SOURCE[padlock]=e_padlock.c {- $target{padlock_asm_src} -}
DEPEND[libpadlock]=../libcrypto DEPEND[padlock]=../libcrypto
INCLUDE[libpadlock]={- rel2abs(catdir($builddir,"../include")) -} ../include INCLUDE[padlock]={- rel2abs(catdir($builddir,"../include")) -} ../include
SOURCE[libcapi]=e_capi.c SOURCE[capi]=e_capi.c
DEPEND[libcapi]=../libcrypto DEPEND[capi]=../libcrypto
INCLUDE[libcapi]={- rel2abs(catdir($builddir,"../include")) -} ../include INCLUDE[capi]={- rel2abs(catdir($builddir,"../include")) -} ../include
SOURCE[libdasync]=e_dasync.c SOURCE[dasync]=e_dasync.c
DEPEND[libdasync]=../libcrypto DEPEND[dasync]=../libcrypto
INCLUDE[libdasync]={- rel2abs(catdir($builddir,"../include")) -} ../include INCLUDE[dasync]={- rel2abs(catdir($builddir,"../include")) -} ../include
SOURCE[libossltest]=e_ossltest.c SOURCE[ossltest]=e_ossltest.c
DEPEND[libossltest]=../libcrypto DEPEND[ossltest]=../libcrypto
INCLUDE[libossltest]={- rel2abs(catdir($builddir,"../include")) -} ../include INCLUDE[ossltest]={- rel2abs(catdir($builddir,"../include")) -} ../include
ENDIF ENDIF
BEGINRAW[Makefile] BEGINRAW[Makefile]