diff options
-rw-r--r-- | Makefile.shared | 32 | ||||
-rw-r--r-- | crypto/engine/eng_dyn.c | 2 | ||||
-rw-r--r-- | engines/Makefile.in | 33 | ||||
-rw-r--r-- | engines/build.info | 26 |
4 files changed, 39 insertions, 54 deletions
diff --git a/Makefile.shared b/Makefile.shared index 83bc265cd6..b72781d57c 100644 --- a/Makefile.shared +++ b/Makefile.shared @@ -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=''; \ diff --git a/crypto/engine/eng_dyn.c b/crypto/engine/eng_dyn.c index 3ca24807c7..648332a585 100644 --- a/crypto/engine/eng_dyn.c +++ b/crypto/engine/eng_dyn.c @@ -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); } diff --git a/engines/Makefile.in b/engines/Makefile.in index e54d60e3ec..99ba822fb2 100644 --- a/engines/Makefile.in +++ b/engines/Makefile.in @@ -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 diff --git a/engines/build.info b/engines/build.info index e45650ca20..cae49862ed 100644 --- a/engines/build.info +++ b/engines/build.info @@ -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] |