[openssl] master update

Richard Levitte levitte at openssl.org
Wed Dec 11 17:33:30 UTC 2019


The branch master has been updated
       via  098404128383ded87ba390dd74ecd9e2ffa6f530 (commit)
       via  34ab13b7d8e3e723adb60be8142e38b7c9cd382a (commit)
      from  68a51d59a29796803af3b6e7f0142feca2622c9e (commit)


- Log -----------------------------------------------------------------
commit 098404128383ded87ba390dd74ecd9e2ffa6f530
Author: Andy Polyakov <appro at openssl.org>
Date:   Sun May 5 18:30:55 2019 +0200

    Configure: use ELFv2 ABI on some ppc64 big endian systems
    
    If _CALL_ELF is defined to be 2, it's an ELFv2 system.
    Conditionally switch to the v2 perlasm scheme.
    
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/8883)

commit 34ab13b7d8e3e723adb60be8142e38b7c9cd382a
Author: Andy Polyakov <appro at openssl.org>
Date:   Sun May 5 18:25:50 2019 +0200

    crypto/perlasm/ppc-xlate.pl: add linux64v2 flavour
    
    This is a big endian ELFv2 configuration. ELFv2 was already being
    used for little endian, and big endian was traditionally ELFv1
    but there are practical configurations that use ELFv2 with big
    endian nowadays (Adélie Linux, Void Linux, possibly Gentoo, etc.)
    
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/8883)

-----------------------------------------------------------------------

Summary of changes:
 Configure                   | 10 +++++++---
 crypto/perlasm/ppc-xlate.pl |  8 ++++----
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/Configure b/Configure
index 22082deb4c..e303d98deb 100755
--- a/Configure
+++ b/Configure
@@ -1394,14 +1394,18 @@ if ($target{sys_id} ne "")
         push @{$config{openssl_sys_defines}}, "OPENSSL_SYS_$target{sys_id}";
         }
 
-unless ($disabled{asm}) {
-}
-
 my %predefined_C = compiler_predefined($config{CROSS_COMPILE}.$config{CC});
 my %predefined_CXX = $config{CXX}
     ? compiler_predefined($config{CROSS_COMPILE}.$config{CXX})
     : ();
 
+unless ($disabled{asm}) {
+    # big endian systems can use ELFv2 ABI
+    if ($target eq "linux-ppc64") {
+        $target{perlasm_scheme} = "linux64v2" if ($predefined_C{_CALL_ELF} == 2);
+    }
+}
+
 # Check for makedepend capabilities.
 if (!$disabled{makedepend}) {
     if ($config{target} =~ /^(VC|vms)-/) {
diff --git a/crypto/perlasm/ppc-xlate.pl b/crypto/perlasm/ppc-xlate.pl
index e52f2f6ea6..5fcd0526df 100755
--- a/crypto/perlasm/ppc-xlate.pl
+++ b/crypto/perlasm/ppc-xlate.pl
@@ -49,7 +49,7 @@ my $globl = sub {
 	/osx/		&& do { $name = "_$name";
 				last;
 			      };
-	/linux.*(32|64le)/
+	/linux.*(32|64(le|v2))/
 			&& do {	$ret .= ".globl	$name";
 				if (!$$type) {
 				    $ret .= "\n.type	$name,\@function";
@@ -80,7 +80,7 @@ my $globl = sub {
 };
 my $text = sub {
     my $ret = ($flavour =~ /aix/) ? ".csect\t.text[PR],7" : ".text";
-    $ret = ".abiversion	2\n".$ret	if ($flavour =~ /linux.*64le/);
+    $ret = ".abiversion	2\n".$ret	if ($flavour =~ /linux.*64(le|v2)/);
     $ret;
 };
 my $machine = sub {
@@ -186,7 +186,7 @@ my $vmr = sub {
 
 # Some ABIs specify vrsave, special-purpose register #256, as reserved
 # for system use.
-my $no_vrsave = ($flavour =~ /aix|linux64le/);
+my $no_vrsave = ($flavour =~ /aix|linux64(le|v2)/);
 my $mtspr = sub {
     my ($f,$idx,$ra) = @_;
     if ($idx == 256 && $no_vrsave) {
@@ -320,7 +320,7 @@ while($line=<>) {
 	if ($label) {
 	    my $xlated = ($GLOBALS{$label} or $label);
 	    print "$xlated:";
-	    if ($flavour =~ /linux.*64le/) {
+	    if ($flavour =~ /linux.*64(le|v2)/) {
 		if ($TYPES{$label} =~ /function/) {
 		    printf "\n.localentry	%s,0\n",$xlated;
 		}


More information about the openssl-commits mailing list