summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2023-03-01 16:27:50 +0100
committerRichard Levitte <levitte@openssl.org>2023-03-08 12:29:22 +0100
commit1939ee7f252ffebd91c29384db4133290489e026 (patch)
tree68d23ca3bbf4c30f7ca88a0fb08ec7171d07478e /util
parent931369429564b5a9bb09711de8e885fef546a0ac (diff)
downloadopenssl-new-1939ee7f252ffebd91c29384db4133290489e026.tar.gz
Fix util/wrap.pl.in for VMS usage
In the name of consistency, make sure that this same script is used across more platforms, in this case VMS. This removes the need for util/local_shlib.com.in and util/unlocal_shlib.com.in, which were under-used anyway. Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20415)
Diffstat (limited to 'util')
-rw-r--r--util/build.info6
-rw-r--r--util/local_shlib.com.in31
-rw-r--r--util/unlocal_shlib.com.in27
-rw-r--r--util/wrap.pl.in34
4 files changed, 27 insertions, 71 deletions
diff --git a/util/build.info b/util/build.info
index 80120fdae1..c49d3e068d 100644
--- a/util/build.info
+++ b/util/build.info
@@ -1,8 +1,4 @@
-IF[{- $target{build_scheme}->[1] eq "VMS" -}]
- SCRIPTS{noinst}=local_shlib.com unlocal_shlib.com
- SOURCE[local_shlib.com]=local_shlib.com.in
- SOURCE[unlocal_shlib.com]=unlocal_shlib.com.in
-ELSIF[{- $target{build_scheme}->[1] eq "unix" -}]
+IF[{- $target{build_scheme}->[1] eq "unix" -}]
SCRIPTS{noinst}=shlib_wrap.sh
SOURCE[shlib_wrap.sh]=shlib_wrap.sh.in
ENDIF
diff --git a/util/local_shlib.com.in b/util/local_shlib.com.in
deleted file mode 100644
index fbb648d770..0000000000
--- a/util/local_shlib.com.in
+++ /dev/null
@@ -1,31 +0,0 @@
-${-
- use File::Spec::Functions qw(rel2abs);
-
- my $bldtop = rel2abs($config{builddir});
- our %names = ( map { platform->sharedname($_) =>
- $bldtop.platform->sharedlib($_) }
- grep { !$unified_info{attributes}->{libraries}->{$_}->{noinst} }
- @{$unified_info{libraries}} );
- "" -}
-$ ! Create a local environment with the shared library logical names
-$ ! properly set. Undo this with unlocal_shlib.com
-$
-$ OPENSSL_NAMES := OPENSSL_NAMES_'F$GETJPI("","PID")'
-$ CREATE/NAME_TABLE/PARENT_TABLE=LNM$PROCESS_DIRECTORY 'OPENSSL_NAMES'
-$ DEFINE/TABLE='OPENSSL_NAMES' OSSL_FLAG YES
-$
-$ NAMES := {- join(",", keys %names); -}
-{-
- join("\n", map { "\$ __$_ = \"".$names{$_}."\"" } sort keys %names);
--}
-$ I = 0
-$ LOOP:
-$ E = F$ELEMENT(I,",",NAMES)
-$ I = I + 1
-$ IF E .EQS. "," THEN GOTO ENDLOOP
-$ EV = __'E'
-$ OLDV = F$TRNLNM(E,"LNM$PROCESS")
-$ IF OLDV .NES. "" THEN DEFINE/TABLE='OPENSSL_NAMES' 'E' 'OLDV'
-$ DEFINE 'E' 'EV'
-$ GOTO LOOP
-$ ENDLOOP:
diff --git a/util/unlocal_shlib.com.in b/util/unlocal_shlib.com.in
deleted file mode 100644
index 17cb489545..0000000000
--- a/util/unlocal_shlib.com.in
+++ /dev/null
@@ -1,27 +0,0 @@
-${-
- use File::Spec::Functions qw(rel2abs);
-
- my $bldtop = rel2abs($config{builddir});
- our %names = ( map { platform->sharedname($_) =>
- $bldtop.platform->sharedlib($_) }
- grep { !$unified_info{attributes}->{libraries}->{$_}->{noinst} }
- @{$unified_info{libraries}} );
- "" -}
-$ ! Remove the local environment created by local_shlib.com
-$
-$ OPENSSL_NAMES := OPENSSL_NAMES_'F$GETJPI("","PID")'
-$ IF F$TRNLNM("OSSL_FLAG",OPENSSL_NAMES) .EQS. "" THEN EXIT 0
-$
-$ NAMES := {- join(",", sort keys %names); -}
-$ I = 0
-$ LOOP:
-$ E = F$ELEMENT(I,",",NAMES)
-$ I = I + 1
-$ IF E .EQS. "," THEN GOTO ENDLOOP
-$ OLDV = F$TRNLNM(E,OPENSSL_NAMES)
-$ DEASSIGN 'E'
-$ IF OLDV .NES. "" THEN DEFINE 'E' 'OLDV'
-$ GOTO LOOP
-$ ENDLOOP:
-$
-$ DEASSIGN 'OPENSSL_NAMES' /TABLE=LNM$PROCESS_DIRECTORY
diff --git a/util/wrap.pl.in b/util/wrap.pl.in
index 5126513d4c..7d11cb7c27 100644
--- a/util/wrap.pl.in
+++ b/util/wrap.pl.in
@@ -23,6 +23,7 @@ my $std_engines = catdir($there, 'engines');
my $std_providers = catdir($there, 'providers');
my $std_openssl_conf = catdir($there, 'apps/openssl.cnf');
my $unix_shlib_wrap = catfile($there, 'util/shlib_wrap.sh');
+my $std_openssl_conf_include;
if ($ARGV[0] eq '-fips') {
$std_openssl_conf = {-
@@ -32,19 +33,36 @@ if ($ARGV[0] eq '-fips') {
-};
shift;
- my $std_openssl_conf_include = catdir($there, 'providers');
- $ENV{OPENSSL_CONF_INCLUDE} = $std_openssl_conf_include
- if ($ENV{OPENSSL_CONF_INCLUDE} // '') eq ''
- && -d $std_openssl_conf_include;
+ $std_openssl_conf_include = catdir($there, 'providers');
}
-$ENV{OPENSSL_ENGINES} = $std_engines
+local $ENV{OPENSSL_CONF_INCLUDE} = $std_openssl_conf_include
+ if defined $std_openssl_conf_include
+ &&($ENV{OPENSSL_CONF_INCLUDE} // '') eq ''
+ && -d $std_openssl_conf_include;
+local $ENV{OPENSSL_ENGINES} = $std_engines
if ($ENV{OPENSSL_ENGINES} // '') eq '' && -d $std_engines;
-$ENV{OPENSSL_MODULES} = $std_providers
+local $ENV{OPENSSL_MODULES} = $std_providers
if ($ENV{OPENSSL_MODULES} // '') eq '' && -d $std_providers;
-$ENV{OPENSSL_CONF} = $std_openssl_conf
+local $ENV{OPENSSL_CONF} = $std_openssl_conf
if ($ENV{OPENSSL_CONF} // '') eq '' && -f $std_openssl_conf;
-
+{-
+ # For VMS, we define logical names to get the libraries properly
+ # defined.
+ use File::Spec::Functions qw(rel2abs);
+
+ if ($^O eq "VMS") {
+ my $bldtop = rel2abs($config{builddir});
+ my %names =
+ map { platform->sharedname($_) => $bldtop.platform->sharedlib($_) }
+ grep { !$unified_info{attributes}->{libraries}->{$_}->{noinst} }
+ @{$unified_info{libraries}};
+
+ foreach (sort keys %names) {
+ $OUT .= "local \$ENV\{'$_'\} = '$names{$_}';\n";
+ }
+ }
+-}
my $use_system = 0;
my @cmd;