[openssl] master update

Richard Levitte levitte at openssl.org
Wed Jun 12 09:09:49 UTC 2019


The branch master has been updated
       via  51583cb8f464b49d2ea33b2be027274ac0d4b1a0 (commit)
      from  a8140a42f5ee9e4e1423b5b6b319dc4657659f6f (commit)


- Log -----------------------------------------------------------------
commit 51583cb8f464b49d2ea33b2be027274ac0d4b1a0
Author: Richard Levitte <levitte at openssl.org>
Date:   Tue Jun 11 18:11:25 2019 +0200

    Configure: count basenames for all library sources
    
    Make sure that each basename only appears once.  This is due to the
    static library archiver on Unix, that indexes archived object files by
    base name only, thereby making base name clashes...  interesting.
    
    This is a safety net for OpenSSL developer!
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Shane Lontis <shane.lontis at oracle.com>
    (Merged from https://github.com/openssl/openssl/pull/9133)

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

Summary of changes:
 Configure | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/Configure b/Configure
index e3c28f9..de59b8a 100755
--- a/Configure
+++ b/Configure
@@ -2209,6 +2209,34 @@ They are ignored and should be replaced with a combination of GENERATE,
 DEPEND and SHARED_SOURCE.
 EOF
 
+
+    # Go through the sources of all libraries and check that the same basename
+    # doesn't appear more than once.  Some static library archivers depend on
+    # them being unique.
+    {
+        my $err = 0;
+        foreach my $prod (keys %{$unified_info{libraries}}) {
+            my @prod_sources =
+                map { keys %{$unified_info{sources}->{$_}} }
+                keys %{$unified_info{sources}->{$prod}};
+            my %srccnt = ();
+
+            # Count how many times a given each source basename
+            # appears for each product.
+            foreach my $src (@prod_sources) {
+                $srccnt{basename $src}++;
+            }
+
+            foreach my $src (keys %srccnt) {
+                if ((my $cnt = $srccnt{$src}) > 1) {
+                    print STDERR "$src appears $cnt times for the product $prod\n";
+                    $err++
+                }
+            }
+        }
+        die if $err > 0;
+    }
+
     # Massage the result
 
     # If we depend on a header file or a perl module, add an inclusion of
@@ -2319,6 +2347,7 @@ EOF
             }
         }
     }
+
     # At this point, we have a number of sources with the value -1.  They
     # aren't part of the local build and are probably meant for a different
     # platform, and can therefore be cleaned away.  That happens when making


More information about the openssl-commits mailing list