[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Thu Sep 8 22:13:34 UTC 2016


The branch master has been updated
       via  1750142f43436c9e074352580f1b434fd3b87f3a (commit)
       via  84f3867536625253b48e270cc261f0559b8861a9 (commit)
      from  e82e2186e93e9a678dd8c0c5ba084d21d27d4d62 (commit)


- Log -----------------------------------------------------------------
commit 1750142f43436c9e074352580f1b434fd3b87f3a
Author: Richard Levitte <levitte at openssl.org>
Date:   Thu Sep 8 19:23:38 2016 +0200

    VMS: Use different C flags for programs that aren't to be installed
    
    This is generalised by having the following macros for stuff that won't
    be installed:
    
        NO_INST_LIB_CFLAGS, used instead of LIB_CFLAGS
        NO_INST_DSO_CFLAGS, used instead of DSO_CFLAGS
        NO_INST_BIN_CFLAGS, used instead of BIN_CFLAGS
    
    They take values from corresponding target config fields if those are
    defined, otherwise they take the respective values from LIB_CFLAGS,
    DSO_CFLAGS and BIN_CFLAGS.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

commit 84f3867536625253b48e270cc261f0559b8861a9
Author: Richard Levitte <levitte at openssl.org>
Date:   Thu Sep 8 18:09:47 2016 +0200

    Build file templates: additional information to build file template functions
    
    Send a bit information to the build file template functions.  For
    src2obj(), the additional option 'product' holds the name of the final
    file that the object file will go into.  Additionally, the diverse
    functions will get the option 'installed', with a value that evaluates
    true if the final product is to be installed, otherwise false.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

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

Summary of changes:
 Configurations/10-main.conf     |  3 +++
 Configurations/common.tmpl      | 29 +++++++++++++++++++++++------
 Configurations/descrip.mms.tmpl | 16 +++++++++++++---
 3 files changed, 39 insertions(+), 9 deletions(-)

diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
index 463365d..895385f 100644
--- a/Configurations/10-main.conf
+++ b/Configurations/10-main.conf
@@ -1768,6 +1768,9 @@ sub vms_info {
                                    release => "/NODEBUG/NOTRACEBACK"),
         lib_cflags       => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"),
         dso_cflags       => add("/NAMES=(AS_IS,SHORTENED)"),
+        # no_inst_bin_cflags is used instead of bin_cflags by descrip.mms.tmpl
+        # for object files belonging to selected internal programs
+        no_inst_bin_cflags => "/NAMES=(AS_IS,SHORTENED)",
         shared_target    => "vms-shared",
         dso_scheme       => "vms",
         thread_scheme    => "pthreads",
diff --git a/Configurations/common.tmpl b/Configurations/common.tmpl
index 9d7fbf2..d811a2a 100644
--- a/Configurations/common.tmpl
+++ b/Configurations/common.tmpl
@@ -34,6 +34,18 @@
      @newlist;
  }
 
+ # is_installed checks if a given file will be installed (i.e. they are
+ # not defined _NO_INST in build.info)
+ sub is_installed {
+     my $product = shift;
+     if (grep { $product eq $_ }
+         map { (@{$unified_info{install}->{$_}}) }
+         keys %{$unified_info{install}}) {
+         return 1;
+     }
+     return 0;
+ }
+
  # dogenerate is responsible for producing all the recipes that build
  # generated source files.  It recurses in case a dependency is also a
  # generated source file.
@@ -72,6 +84,7 @@
      my %opts = @_;
      if (@{$unified_info{sources}->{$obj}}) {
          $OUT .= src2obj(obj => $obj_no_o,
+                         product => $bin,
                          srcs => $unified_info{sources}->{$obj},
                          deps => $unified_info{depends}->{$obj},
                          incs => [ @{$unified_info{includes}->{$bin}},
@@ -102,9 +115,10 @@
                                         (@{$unified_info{sources}->{$lib}},
                                          @{$unified_info{shared_sources}->{$lib}}) ],
                               deps => [ reducedepends(resolvedepends($lib)) ],
+                              installed => is_installed($lib),
                               %ordinals);
          foreach (@{$unified_info{shared_sources}->{$lib}}) {
-             doobj($_, $lib, intent => "lib");
+             doobj($_, $lib, intent => "lib", installed => is_installed($lib));
          }
      }
      $OUT .= obj2lib(lib => $lib,
@@ -126,10 +140,11 @@
                      objs => [ map { (my $x = $_) =~ s|\.o$||; $x }
                                (@{$unified_info{sources}->{$lib}},
                                 @{$unified_info{shared_sources}->{$lib}}) ],
-                     deps => [ resolvedepends($lib) ]);
+                     deps => [ resolvedepends($lib) ],
+                     installed => is_installed($lib));
      foreach ((@{$unified_info{sources}->{$lib}},
                @{$unified_info{shared_sources}->{$lib}})) {
-         doobj($_, $lib, intent => "dso");
+         doobj($_, $lib, intent => "dso", installed => is_installed($lib));
      }
      $cache{$lib} = 1;
  }
@@ -143,9 +158,10 @@
      $OUT .= obj2bin(bin => $bin,
                      objs => [ map { (my $x = $_) =~ s|\.o$||; $x }
                                @{$unified_info{sources}->{$bin}} ],
-                     deps => $deps);
+                     deps => $deps,
+                     installed => is_installed($bin));
      foreach (@{$unified_info{sources}->{$bin}}) {
-         doobj($_, $bin, intent => "bin");
+         doobj($_, $bin, intent => "bin", installed => is_installed($bin));
      }
      $cache{$bin} = 1;
  }
@@ -156,7 +172,8 @@
      my $script = shift;
      return "" if $cache{$script};
      $OUT .= in2script(script => $script,
-                       sources => $unified_info{sources}->{$script});
+                       sources => $unified_info{sources}->{$script},
+                       installed => is_installed($script));
      $cache{$script} = 1;
  }
 
diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl
index ce96778..108ab5d 100644
--- a/Configurations/descrip.mms.tmpl
+++ b/Configurations/descrip.mms.tmpl
@@ -168,6 +168,9 @@ EX_LIBS= {- $target{ex_libs} ? ",".$target{ex_libs} : "" -}{- $config{ex_libs} ?
 LIB_CFLAGS={- $target{lib_cflags} || "" -}
 DSO_CFLAGS={- $target{dso_cflags} || "" -}
 BIN_CFLAGS={- $target{bin_cflags} || "" -}
+NO_INST_LIB_CFLAGS={- $target{no_inst_lib_cflags} || '$(LIB_CFLAGS)' -}
+NO_INST_DSO_CFLAGS={- $target{no_inst_dso_cflags} || '$(DSO_CFLAGS)' -}
+NO_INST_BIN_CFLAGS={- $target{no_inst_bin_cflags} || '$(BIN_CFLAGS)' -}
 
 PERL={- $config{perl} -}
 
@@ -567,9 +570,16 @@ EOF
       my $srcs =
           join(", ",
                map { abs2rel(rel2abs($_), rel2abs($forward)) } @{$args{srcs}});
-      my $ecflags = { lib => '$(LIB_CFLAGS)',
-                      dso => '$(DSO_CFLAGS)',
-                      bin => '$(BIN_CFLAGS)' } -> {$args{intent}};
+      my $ecflags;
+      if ($args{installed}) {
+          $ecflags = { lib => '$(LIB_CFLAGS)',
+                       dso => '$(DSO_CFLAGS)',
+                       bin => '$(BIN_CFLAGS)' } -> {$args{intent}};
+      } else {
+          $ecflags = { lib => '$(NO_INST_LIB_CFLAGS)',
+                       dso => '$(NO_INST_DSO_CFLAGS)',
+                       bin => '$(NO_INST_BIN_CFLAGS)' } -> {$args{intent}};
+      }
       my $incs_on = "\@ !";
       my $incs_off = "\@ !";
       my $incs = "";


More information about the openssl-commits mailing list