Commit 1750142f authored by Richard Levitte's avatar Richard Levitte
Browse files

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: default avatarRich Salz <rsalz@openssl.org>
parent 84f38675
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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",
+13 −3
Original line number Diff line number Diff line
@@ -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)',
      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 = "";