Commit 9ee0ed3d authored by Richard Levitte's avatar Richard Levitte
Browse files

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: default avatarAndy Polyakov <appro@openssl.org>
parent 24e75727
Loading
Loading
Loading
Loading
+12 −20
Original line number Diff line number Diff line
@@ -163,7 +163,7 @@ LINK_SO_SHLIB_UNPACKED= \
DETECT_GNU_LD=($(CC) -Wl,-V /dev/null 2>&1 | grep '^GNU ld' )>/dev/null

DO_GNU_SO_NOCALC=\
	SHLIB=lib$(LIBNAME).so; \
	SHLIB=$(LIBNAME).so; \
	SHLIB_SUFFIX=; \
	ALLSYMSFLAGS='-Wl,--whole-archive'; \
	NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
@@ -194,7 +194,7 @@ link_shlib.linux-shared:

link_dso.bsd:
	@if $(DETECT_GNU_LD); then $(DO_GNU_SO_NOCALC); else \
	SHLIB=lib$(LIBNAME).so; \
	SHLIB=$(LIBNAME).so; \
	SHLIB_SUFFIX=; \
	LIBDEPS=" "; \
	ALLSYMSFLAGS="-Wl,-Bforcearchive"; \
@@ -234,7 +234,7 @@ link_app.bsd:
# Alternative to this heuristic approach is to develop specific
# MacOS X dso module relying on whichever "native" dyld interface.
link_dso.darwin:
	@ SHLIB=lib$(LIBNAME); \
	@ SHLIB=$(LIBNAME); \
	SHLIB_SUFFIX=.dylib; \
	ALLSYMSFLAGS='-all_load'; \
	NOALLSYMSFLAGS=''; \
@@ -259,20 +259,12 @@ link_app.darwin: # is there run-path on darwin?
	$(LINK_APP)

link_dso.cygwin:
	INHIBIT_SYMLINKS=yes; \
	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=$(LIBNAME); \
	SHLIB_SUFFIX=.dll; \
	ALLSYMSFLAGS='-Wl,--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)
#for mingw target if def-file is in use dll-name should match library-name
link_shlib.cygwin:
@@ -309,7 +301,7 @@ link_dso.alpha-osf1:
	@ if $(DETECT_GNU_LD); then \
		$(DO_GNU_SO_NOCALC); \
	else \
		SHLIB=lib$(LIBNAME).so; \
		SHLIB=$(LIBNAME).so; \
		SHLIB_SUFFIX=; \
		ALLSYMSFLAGS='-all'; \
		NOALLSYMSFLAGS='-none'; \
@@ -384,7 +376,7 @@ link_dso.svr3:
		$(DO_GNU_SO_NOCALC); \
	else \
		$(CALC_VERSIONS); \
		SHLIB=lib$(LIBNAME).so; \
		SHLIB=$(LIBNAME).so; \
		SHLIB_SUFFIX=; \
		ALLSYMSFLAGS=''; \
		NOALLSYMSFLAGS=''; \
@@ -414,7 +406,7 @@ link_dso.svr5:
	else \
		SHARE_FLAG='-G'; \
		($(CC) -v 2>&1 | grep gcc) > /dev/null && SHARE_FLAG='-shared'; \
		SHLIB=lib$(LIBNAME).so; \
		SHLIB=$(LIBNAME).so; \
		SHLIB_SUFFIX=; \
		ALLSYMSFLAGS=''; \
		NOALLSYMSFLAGS=''; \
@@ -443,7 +435,7 @@ link_dso.irix:
	@ if $(DETECT_GNU_LD); then \
		$(DO_GNU_SO_NOCALC); \
	else \
		SHLIB=lib$(LIBNAME).so; \
		SHLIB=$(LIBNAME).so; \
		SHLIB_SUFFIX=; \
		MINUSWL=""; \
		($(CC) -v 2>&1 | grep gcc) > /dev/null && MINUSWL="-Wl,"; \
@@ -480,7 +472,7 @@ link_app.irix:
#
link_dso.hpux:
	@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; \
	SHLIB_SUFFIX=; \
	ALLSYMSFLAGS='-Wl,-Fl'; \
@@ -512,7 +504,7 @@ link_app.hpux:
link_dso.aix:
	@OBJECT_MODE=`expr "x$(SHARED_LDFLAGS)" : 'x\-[a-z]*\(64\)'` || :; \
	OBJECT_MODE=$${OBJECT_MODE:-32}; export OBJECT_MODE; \
	SHLIB=lib$(LIBNAME).so; \
	SHLIB=$(LIBNAME).so; \
	SHLIB_SUFFIX=; \
	ALLSYMSFLAGS=''; \
	NOALLSYMSFLAGS=''; \
+2 −0
Original line number Diff line number Diff line
@@ -447,6 +447,8 @@ static int dynamic_load(ENGINE *e, dynamic_data_ctx *ctx)
    if (!ctx->DYNAMIC_LIBNAME) {
        if (!ctx->engine_id)
            return 0;
        DSO_ctrl(ctx->dynamic_dso, DSO_CTRL_SET_FLAGS,
                 DSO_FLAG_NAME_TRANSLATION_EXT_ONLY, NULL);
        ctx->DYNAMIC_LIBNAME =
            DSO_convert_filename(ctx->dynamic_dso, ctx->engine_id);
    }
+12 −21
Original line number Diff line number Diff line
@@ -79,33 +79,24 @@ e_padlock-x86_64.s: asm/e_padlock-x86_64.pl
files:
	$(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:
	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
	@if [ -n "$(SHARED_LIBS)" ]; then \
		set -e; \
		$(PERL) $(TOP)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines; \
		for l in $(LIBNAMES); do \
			( echo installing $$l; \
			  pfx=lib; \
			  if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
				sfx=".so"; \
				cp cyg$$l.dll $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
			  else \
				case "$(CFLAGS)" in \
				*DSO_DLFCN*)	sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;;	\
				*DSO_DL*)	sfx=".sl";;	\
				*DSO_WIN32*)	sfx="eay32.dll"; pfx=;;	\
				*)		sfx=".bad";;	\
				esac; \
				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 ); \
			cp $${l}$(DSO_EXT) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT).new; \
			chmod 555 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT).new; \
			mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT).new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT); \
		done; \
	fi

uninstall:
	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
	@if [ -n "$(SHARED_LIBS)" ]; then \
		set -e; \
		for l in $(LIBNAMES); do \
			$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT); \
		done; \
	fi

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

BEGINRAW[Makefile]