[openssl-commits] [openssl] master update
Andy Polyakov
appro at openssl.org
Fri Jun 22 08:58:20 UTC 2018
The branch master has been updated
via 8b2f413e8f2f85e5bcc229e3b63c7f32c7c3c1fd (commit)
via bd3d8c12606c48388be61db0681ac759804b6100 (commit)
via 8f29569ef384d0f6f107bb8b1262e36d874a3cc7 (commit)
via cff89b179c91c7c1f6f08b2c1f1697005c1804d2 (commit)
via b48d4397b8ee4256f0b0a115eb99f27ae89995e0 (commit)
from 3f5abab94104574c32991243668ac633a8d8e525 (commit)
- Log -----------------------------------------------------------------
commit 8b2f413e8f2f85e5bcc229e3b63c7f32c7c3c1fd
Author: Andy Polyakov <appro at openssl.org>
Date: Tue Jun 19 18:25:19 2018 +0200
CHANGES: mention AIX shared library support overhaul.
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6487)
commit bd3d8c12606c48388be61db0681ac759804b6100
Author: Andy Polyakov <appro at openssl.org>
Date: Fri Jun 15 15:41:07 2018 +0200
recipes/90-test_shlibload.t: disable tests on AIX till further notice.
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6487)
commit 8f29569ef384d0f6f107bb8b1262e36d874a3cc7
Author: Andy Polyakov <appro at openssl.org>
Date: Fri Jun 15 15:24:14 2018 +0200
Configurations/10-main.conf: always pass -bsrv4 to AIX linker.
This makes AIX build procedure behave more like e.g. Solaris. Most
notably this makes it possible to pass -Wl,-R,'$(LIBRPATH)' at config
time to embed installation destination as library search path into
openssl binary. This doesn't imply that other applications have to be
linked with -bsvr4, they are free to choose whatever appropriate for
given circumstances.
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6487)
commit cff89b179c91c7c1f6f08b2c1f1697005c1804d2
Author: Andy Polyakov <appro at openssl.org>
Date: Thu Jun 14 11:45:15 2018 +0200
Configurations/unix-Makefile.tmpl: switch to "natural" AIX shared libraries.
AIX treats its shared libraries in unique manner, by placing multiple
shared objects of different versions and bitnesses, into .a file.
So far we have been naively linking with version-less libcrypto|ssl.so,
which poses long-term maintenance problems. One could choose to link
straight with libcrypto.so.X.Y [or libcrypto.X.Y.so], but it would be
inconsistent with the way AIX [or Unix] does things.
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6487)
commit b48d4397b8ee4256f0b0a115eb99f27ae89995e0
Author: Andy Polyakov <appro at openssl.org>
Date: Thu Jun 14 22:07:48 2018 +0200
Configure: allow some file extensions to be overridden by target config.
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6487)
-----------------------------------------------------------------------
Summary of changes:
CHANGES | 9 ++++++++
Configurations/10-main.conf | 13 ++++++++----
Configurations/unix-Makefile.tmpl | 44 ++++++++++++++++++++++++++++++---------
Configure | 5 +++--
test/recipes/90-test_shlibload.t | 1 +
5 files changed, 56 insertions(+), 16 deletions(-)
diff --git a/CHANGES b/CHANGES
index 8b4a8bb..c272e8d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -8,6 +8,15 @@
release branch.
Changes between 1.1.0h and 1.1.1 [xx XXX xxxx]
+
+ *) AIX shared library support overhaul. Switch to AIX "natural" way of
+ handling shared libraries, which means collecting shared objects of
+ different versions and bitnesses in one common archive. This allows to
+ mitigate conflict between 1.0 and 1.1 side-by-side installations. It
+ doesn't affect the way 3rd party applications are linked, only how
+ multi-version installation is managed.
+ [Andy Polyakov]
+
*) Make ec_group_do_inverse_ord() more robust and available to other
EC cryptosystems, so that irrespective of BN_FLG_CONSTTIME, SCA
mitigations are applied to the fallback BN_mod_inverse().
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
index a62abe2..62b4c9d 100644
--- a/Configurations/10-main.conf
+++ b/Configurations/10-main.conf
@@ -1110,14 +1110,17 @@ my %targets = (
template => 1,
sys_id => "AIX",
lib_cppflags => "-DB_ENDIAN",
+ lflags => "-Wl,-bsvr4",
thread_scheme => "pthreads",
dso_scheme => "dlfcn",
shared_target => "self",
- shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
- bin_lflags => shared("-Wl,-bsvr4"),
- module_ldflags => "-Wl,-G,-bsymbolic,-bexpall,-bnolibpath",
- shared_ldflag => "-Wl,-G,-bsymbolic,-bnolibpath",
+ module_ldflags => "-Wl,-G,-bsymbolic,-bexpall",
+ shared_ldflag => "-Wl,-G,-bsymbolic",
shared_defflag => "-Wl,-bE:",
+ shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
+ dso_extension => ".so",
+ lib_extension => shared("_a.a"),
+ shared_extension_simple => shared(".a"),
},
"aix-gcc" => {
inherit_from => [ "aix-common", asm("ppc32_asm") ],
@@ -1142,6 +1145,7 @@ my %targets = (
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
perlasm_scheme => "aix64",
shared_ldflag => add_before("-shared -static-libgcc"),
+ shared_extension => "64.so.\$(SHLIB_VERSION_NUMBER)",
AR => add("-X64"),
RANLIB => add("-X64"),
},
@@ -1173,6 +1177,7 @@ my %targets = (
perlasm_scheme => "aix64",
dso_scheme => "dlfcn",
shared_cflag => "-qpic",
+ shared_extension => "64.so.\$(SHLIB_VERSION_NUMBER)",
AR => add("-X64"),
RANLIB => add("-X64"),
},
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index 42da98d..8d33e84 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -16,6 +16,10 @@
sub windowsdll { $config{target} =~ /^(?:Cygwin|mingw)/ }
+ # Shared AIX support is special. We put libcrypto[64].so.ver into
+ # libcrypto.a and use libcrypto_a.a as static one.
+ sub sharedaix { !$disabled{shared} && $config{target} =~ /^aix/ }
+
our $sover_dirname = $config{shlib_version_number};
$sover_dirname =~ s|\.|_|g
if $config{target} =~ /^mingw/;
@@ -506,7 +510,7 @@ install_dev:
s2=`echo "$$s" | cut -f2 -d";"`; \
fn1=`basename $$s1`; \
fn2=`basename $$s2`; \
- : {- output_off() if windowsdll(); "" -}; \
+ : {- output_off(); output_on() unless windowsdll() or sharedaix(); "" -}; \
$(ECHO) "install $$s1 -> $(DESTDIR)$(libdir)/$$fn1"; \
cp $$s1 $(DESTDIR)$(libdir)/$$fn1.new; \
chmod 755 $(DESTDIR)$(libdir)/$$fn1.new; \
@@ -516,13 +520,28 @@ install_dev:
$(ECHO) "link $(DESTDIR)$(libdir)/$$fn2 -> $(DESTDIR)$(libdir)/$$fn1"; \
ln -sf $$fn1 $(DESTDIR)$(libdir)/$$fn2; \
fi; \
- : {- output_on() if windowsdll(); "" -}{- output_off() unless windowsdll(); "" -}; \
+ : {- output_off() unless windowsdll() or sharedaix(); output_on() if windowsdll(); "" -}; \
$(ECHO) "install $$s2 -> $(DESTDIR)$(libdir)/$$fn2"; \
cp $$s2 $(DESTDIR)$(libdir)/$$fn2.new; \
chmod 755 $(DESTDIR)$(libdir)/$$fn2.new; \
mv -f $(DESTDIR)$(libdir)/$$fn2.new \
$(DESTDIR)$(libdir)/$$fn2; \
- : {- output_on() unless windowsdll(); "" -}; \
+ : {- output_off() if windowsdll(); output_on() if sharedaix(); "" -}; \
+ a=$(DESTDIR)$(libdir)/$$fn2; \
+ $(ECHO) "install $$s1 -> $$a"; \
+ if [ -f $$a ]; then ( trap "rm -rf /tmp/ar.$$$$" INT 0; \
+ mkdir /tmp/ar.$$$$; ( cd /tmp/ar.$$$$; \
+ cp -f $$a $$a.new; \
+ for so in `$(AR) t $$a`; do \
+ $(AR) x $$a $$so; \
+ chmod u+w $$so; \
+ strip -X32_64 -e $$so; \
+ $(AR) r $$a.new $$so; \
+ done; \
+ )); fi; \
+ $(AR) r $$a.new $$s1; \
+ mv -f $$a.new $$a; \
+ : {- output_off() if sharedaix(); output_on(); "" -}; \
done
@ : {- output_on() if $disabled{shared}; "" -}
@$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(libdir)/pkgconfig
@@ -562,11 +581,11 @@ uninstall_dev:
fn1=`basename $$s1`; \
fn2=`basename $$s2`; \
: {- output_off() if windowsdll(); "" -}; \
- $(ECHO) "$(RM) $(DESTDIR)$(libdir)/$$fn1"; \
- $(RM) $(DESTDIR)$(libdir)/$$fn1; \
- if [ "$$fn1" != "$$fn2" ]; then \
- $(ECHO) "$(RM) $(DESTDIR)$(libdir)/$$fn2"; \
- $(RM) $(DESTDIR)$(libdir)/$$fn2; \
+ $(ECHO) "$(RM) $(DESTDIR)$(libdir)/$$fn2"; \
+ $(RM) $(DESTDIR)$(libdir)/$$fn2; \
+ if [ "$$fn1" != "$$fn2" -a -f "$(DESTDIR)$(libdir)/$$fn1" ]; then \
+ $(ECHO) "$(RM) $(DESTDIR)$(libdir)/$$fn1"; \
+ $(RM) $(DESTDIR)$(libdir)/$$fn1; \
fi; \
: {- output_on() if windowsdll(); "" -}{- output_off() unless windowsdll(); "" -}; \
$(ECHO) "$(RM) $(DESTDIR)$(libdir)/$$fn2"; \
@@ -1105,6 +1124,11 @@ EOF
cp -p $shlib'\$(SHLIB_EXT)' test/
cp -p $shlib'\$(SHLIB_EXT)' fuzz/
EOF
+ } elsif (sharedaix()) {
+ $recipe .= <<"EOF";
+ rm -f $target && \\
+ \$(AR) r $target $target_full
+EOF
} else {
$recipe .= <<"EOF";
if [ '$target' != '$target_full' ]; then \\
@@ -1168,8 +1192,8 @@ EOF
push @linkdirs, $d unless grep { $d eq $_ } @linkdirs;
}
my $linkflags = join("", map { "-L$_ " } @linkdirs);
- my $linklibs = join("", map { if ($_ =~ /\.a$/) {
- " $_";
+ my $linklibs = join("", map { if ($_ =~ s/\.a$//) {
+ " $_$libext";
} else {
my $f = basename($_);
(my $l = $f) =~ s/^lib//;
diff --git a/Configure b/Configure
index 9a60091..2e1902a 100755
--- a/Configure
+++ b/Configure
@@ -1111,8 +1111,9 @@ $target{exe_extension}=".exe" if ($config{target} eq "DJGPP"
$target{exe_extension}=".pm" if ($config{target} =~ /vos/);
($target{shared_extension_simple}=$target{shared_extension})
- =~ s|\.\$\(SHLIB_VERSION_NUMBER\)||;
-$target{dso_extension}=$target{shared_extension_simple};
+ =~ s|\.\$\(SHLIB_VERSION_NUMBER\)||
+ unless defined($target{shared_extension_simple});
+$target{dso_extension}//=$target{shared_extension_simple};
($target{shared_import_extension}=$target{shared_extension_simple}.".a")
if ($config{target} =~ /^(?:Cygwin|mingw)/);
diff --git a/test/recipes/90-test_shlibload.t b/test/recipes/90-test_shlibload.t
index 04d5265..368dea3 100644
--- a/test/recipes/90-test_shlibload.t
+++ b/test/recipes/90-test_shlibload.t
@@ -19,6 +19,7 @@ use lib bldtop_dir('.');
use configdata;
plan skip_all => "Test only supported in a shared build" if disabled("shared");
+plan skip_all => "Test is disabled on AIX" if config('target') =~ m|^aix|;
plan tests => 4;
More information about the openssl-commits
mailing list