aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.shared
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-02-15 18:19:49 +0100
committerRichard Levitte <levitte@openssl.org>2016-02-19 11:51:23 +0100
commit24e75727bddff81004e13dea4cb771cf63a307b7 (patch)
tree1f8cd908de9202f10e6213c9ddee932b9284e696 /Makefile.shared
parente048fd517178d6e608b4c7f3d41799bcf5798d07 (diff)
downloadopenssl-24e75727bddff81004e13dea4cb771cf63a307b7.tar.gz
Simplify the generation of ld scripts for Linux and Solaris
Because we know for certain that the link_shlib targets are used exclusively for shared libraries (libcrypto and libssl) and that they must have an associated .num file, we don't need to check the library name to produce an ld script. Just do it unconditionally. link_shlib.linux-shared can be simplified further, as most of it is exactly the same as $(DO_GNU_SO) with just one variable modification. Reviewed-by: Andy Polyakov <appro@openssl.org>
Diffstat (limited to 'Makefile.shared')
-rw-r--r--Makefile.shared19
1 files changed, 5 insertions, 14 deletions
diff --git a/Makefile.shared b/Makefile.shared
index bc4beab0b4..83bc265cd6 100644
--- a/Makefile.shared
+++ b/Makefile.shared
@@ -187,15 +187,10 @@ link_app.gnu:
@ $(DO_GNU_APP); $(LINK_APP)
link_shlib.linux-shared:
- @if [ $(LIBNAME) != "crypto" -a $(LIBNAME) != "ssl" ]; then $(DO_GNU_SO); else \
- $(PERL) $(SRCDIR)/util/mkdef.pl $(LIBNAME) linux >$(LIBNAME).map; \
- $(CALC_VERSIONS); \
- SHLIB=lib$(LIBNAME).so; \
- SHLIB_SUFFIX=; \
+ @$(PERL) $(SRCDIR)/util/mkdef.pl $(LIBNAME) linux >$(LIBNAME).map; \
+ $(DO_GNU_SO); \
ALLSYMSFLAGS='-Wl,--whole-archive,--version-script=$(LIBNAME).map'; \
- NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
- SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"; \
- fi; $(LINK_SO_SHLIB)
+ $(LINK_SO_SHLIB)
link_dso.bsd:
@if $(DETECT_GNU_LD); then $(DO_GNU_SO_NOCALC); else \
@@ -369,12 +364,8 @@ link_shlib.solaris:
$(CALC_VERSIONS); \
SHLIB=lib$(LIBNAME).so; \
SHLIB_SUFFIX=;\
- if [ $(LIBNAME) != "crypto" -a $(LIBNAME) != "ssl" ]; then \
- ALLSYMSFLAGS="-Wl,-z,allextract"; \
- else \
- $(PERL) $(SRCDIR)/util/mkdef.pl $(LIBNAME) linux >$(LIBNAME).map; \
- ALLSYMSFLAGS="-Wl,-z,allextract,-M,$(LIBNAME).map"; \
- fi; \
+ $(PERL) $(SRCDIR)/util/mkdef.pl $(LIBNAME) linux >$(LIBNAME).map; \
+ ALLSYMSFLAGS="-Wl,-z,allextract,-M,$(LIBNAME).map"; \
NOALLSYMSFLAGS="-Wl,-z,defaultextract"; \
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -Wl,-Bsymbolic"; \
fi; \