From: Richard Levitte Date: Thu, 8 Sep 2016 17:23:38 +0000 (+0200) Subject: VMS: Use different C flags for programs that aren't to be installed X-Git-Tag: OpenSSL_1_1_1-pre1~3576 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1750142f43436c9e074352580f1b434fd3b87f3a;p=openssl 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 --- diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf index 463365deb0..895385ffd3 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/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl index ce96778fe8..108ab5d32d 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 = "";