Configure et al: rename all dso_* to module_* in shared-info.pl
authorRichard Levitte <levitte@openssl.org>
Wed, 7 Mar 2018 19:31:15 +0000 (20:31 +0100)
committerRichard Levitte <levitte@openssl.org>
Thu, 8 Mar 2018 16:24:02 +0000 (17:24 +0100)
Because there are already attributes with the dso_ prefix that are
used instead of the corresponding lib_ attributes rather than in
addition to them, it gets confusing to have similar or exactly the
same attributes working with different semantics on Unix.

So we rename those by changing the prefix dso_ to module_, and having
those work just like the shared_ attributes, but for DSOs.

Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5534)

Configurations/shared-info.pl
Configure

index 971634887f98dd1b7d9f947a27fa1ebc35cad9f5..49b9cc9589364cb4ac35f57c7b695fd35e7608a9 100644 (file)
@@ -42,7 +42,7 @@ my %shared_info;
         };
     },
     'darwin-shared' => {
         };
     },
     'darwin-shared' => {
-        dso_lflags            => '-bundle',
+        module_ldflags        => '-bundle',
         shared_ldflag         => '-dynamiclib -current_version $(SHLIB_VERSION_NUMBER) -compatibility_version $(SHLIB_VERSION_NUMBER)',
         shared_sonameflag     => '-install_name $(INSTALLTOP)/$(LIBDIR)/',
     },
         shared_ldflag         => '-dynamiclib -current_version $(SHLIB_VERSION_NUMBER) -compatibility_version $(SHLIB_VERSION_NUMBER)',
         shared_sonameflag     => '-install_name $(INSTALLTOP)/$(LIBDIR)/',
     },
@@ -61,7 +61,7 @@ my %shared_info;
     'alpha-osf1-shared' => sub {
         return $shared_info{'gnu-shared'} if detect_gnu_ld();
         return {
     'alpha-osf1-shared' => sub {
         return $shared_info{'gnu-shared'} if detect_gnu_ld();
         return {
-            dso_lflags        => '-shared -Wl,-Bsymbolic',
+            module_ldflags    => '-shared -Wl,-Bsymbolic',
             shared_ldflag     => '-shared -Wl,-Bsymbolic -set_version $(SHLIB_VERSION_NUMBER)',
         };
     },
             shared_ldflag     => '-shared -Wl,-Bsymbolic -set_version $(SHLIB_VERSION_NUMBER)',
         };
     },
index 6f70e1892088899344cde68c13339eaa22d72c4a..93e7c0b7511b24acbbd98dd79fa8450a29a1dfbf 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -973,9 +973,9 @@ my %target = resolve_config($target);
 
 # Make the flags to build DSOs the same as for shared libraries unless they
 # are already defined
 
 # Make the flags to build DSOs the same as for shared libraries unless they
 # are already defined
-$target{dso_cflags} = $target{shared_cflag} unless defined $target{dso_cflags};
-$target{dso_cxxflags} = $target{shared_cxxflag} unless defined $target{dso_cxxflags};
-$target{dso_lflags} = $target{shared_ldflag} unless defined $target{dso_lflags};
+$target{module_cflags} = $target{shared_cflag} unless defined $target{module_cflags};
+$target{module_cxxflags} = $target{shared_cxxflag} unless defined $target{module_cxxflags};
+$target{module_ldflags} = $target{shared_ldflag} unless defined $target{module_ldflags};
 {
     my $shared_info_pl =
         catfile(dirname($0), "Configurations", "shared-info.pl");
 {
     my $shared_info_pl =
         catfile(dirname($0), "Configurations", "shared-info.pl");
@@ -997,10 +997,10 @@ $target{dso_lflags} = $target{shared_ldflag} unless defined $target{dso_lflags};
     # Windows and VMS.
     if (defined $si) {
         # Just as above, copy certain shared_* attributes to the corresponding
     # Windows and VMS.
     if (defined $si) {
         # Just as above, copy certain shared_* attributes to the corresponding
-        # dso_ attribute unless the latter is already defined
-        $si->{dso_cflags} = $si->{shared_cflag} unless defined $si->{dso_cflags};
-        $si->{dso_cxxflags} = $si->{shared_cxxflag} unless defined $si->{dso_cxxflags};
-        $si->{dso_lflags} = $si->{shared_ldflag} unless defined $si->{dso_lflags};
+        # module_ attribute unless the latter is already defined
+        $si->{module_cflags} = $si->{shared_cflag} unless defined $si->{module_cflags};
+        $si->{module_cxxflags} = $si->{shared_cxxflag} unless defined $si->{module_cxxflags};
+        $si->{module_ldflags} = $si->{shared_ldflag} unless defined $si->{module_ldflags};
         foreach (sort keys %$si) {
             $target{$_} = defined $target{$_}
                 ? add($si->{$_})->($target{$_})
         foreach (sort keys %$si) {
             $target{$_} = defined $target{$_}
                 ? add($si->{$_})->($target{$_})
@@ -1275,9 +1275,9 @@ unless ($disabled{"fuzz-libfuzzer"} && $disabled{"fuzz-afl"}
 if ($disabled{pic})
        {
        foreach (qw(shared_cflag shared_cxxflag shared_cppflag
 if ($disabled{pic})
        {
        foreach (qw(shared_cflag shared_cxxflag shared_cppflag
-                    shared_defines shared_includes shared_ldflag
-                   dso_cflags dso_cxxflags dso_cppflags
-                    dso_defines dso_includes dso_lflags))
+                   shared_defines shared_includes shared_ldflag
+                   module_cflags module_cxxflags module_cppflags
+                   module_defines module_includes module_lflags))
                {
                delete $config{$_};
                $target{$_} = "";
                {
                delete $config{$_};
                $target{$_} = "";