Fix Solaris link_a and link_o

A long time ago, Solaris cc didn't seem to handle -Wl, linker options,
while gcc on Solaris required it.  Since then, Solaris cc has
developed to understand -Wl, options, and our little dance to figure
out how to pass linker options to the C compiler that's used isn't
needed any more.

Reviewed-by: Andy Polyakov <appro@openssl.org>
This commit is contained in:
Richard Levitte 2016-02-16 14:48:36 +01:00
parent 2235b7f2dd
commit 4ad386412c

View file

@ -380,12 +380,10 @@ link_o.solaris:
$(DO_GNU_SO); \ $(DO_GNU_SO); \
else \ else \
$(CALC_VERSIONS); \ $(CALC_VERSIONS); \
MINUSZ='-z '; \
($(CC) -v 2>&1 | grep gcc) > /dev/null && MINUSZ='-Wl,-z,'; \
SHLIB=lib$(LIBNAME).so; \ SHLIB=lib$(LIBNAME).so; \
SHLIB_SUFFIX=; \ SHLIB_SUFFIX=; \
ALLSYMSFLAGS="$${MINUSZ}allextract"; \ ALLSYMSFLAGS="-Wl,-z,allextract"; \
NOALLSYMSFLAGS="$${MINUSZ}defaultextract"; \ NOALLSYMSFLAGS="-Wl,-z,defaultextract"; \
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -Wl,-Bsymbolic"; \ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -Wl,-Bsymbolic"; \
fi; \ fi; \
$(LINK_SO_O) $(LINK_SO_O)
@ -394,17 +392,15 @@ link_a.solaris:
$(DO_GNU_SO); \ $(DO_GNU_SO); \
else \ else \
$(CALC_VERSIONS); \ $(CALC_VERSIONS); \
MINUSZ='-z '; \
($(CC) -v 2>&1 | grep gcc) > /dev/null && MINUSZ='-Wl,-z,'; \
SHLIB=lib$(LIBNAME).so; \ SHLIB=lib$(LIBNAME).so; \
SHLIB_SUFFIX=;\ SHLIB_SUFFIX=;\
if [ $(LIBNAME) != "crypto" -a $(LIBNAME) != "ssl" ]; then \ if [ $(LIBNAME) != "crypto" -a $(LIBNAME) != "ssl" ]; then \
ALLSYMSFLAGS="$${MINUSZ}allextract"; \ ALLSYMSFLAGS="-Wl,-z,allextract"; \
else \ else \
$(PERL) $(SRCDIR)/util/mkdef.pl $(LIBNAME) linux >$(LIBNAME).map; \ $(PERL) $(SRCDIR)/util/mkdef.pl $(LIBNAME) linux >$(LIBNAME).map; \
ALLSYMSFLAGS="$${MINUSZ}allextract,-M,$(LIBNAME).map"; \ ALLSYMSFLAGS="-Wl,-z,allextract,-M,$(LIBNAME).map"; \
fi; \ fi; \
NOALLSYMSFLAGS="$${MINUSZ}defaultextract"; \ NOALLSYMSFLAGS="-Wl,-z,defaultextract"; \
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -Wl,-Bsymbolic"; \ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -Wl,-Bsymbolic"; \
fi; \ fi; \
$(LINK_SO_A) $(LINK_SO_A)