Fix shared library builds

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2024-09-11 16:07:09 +02:00
parent 71a53b5cc0
commit 9fa8dc44d6

View File

@ -28,6 +28,7 @@ use strict;
use utf8;
use open qw(:std utf8);
use Cwd qw(getcwd);
use Getopt::Long qw(:config auto_help gnu_compat);
use Pod::Usage;
@ -60,15 +61,8 @@ my $skip_re =
')(\z|\.)' );
# in case test suites are linked dynamically
if (-d '../../tf-psa-crypto') {
$ENV{'LD_LIBRARY_PATH'} = '../../library';
$ENV{'DYLD_LIBRARY_PATH'} = '../../library';
}
else
{
$ENV{'LD_LIBRARY_PATH'} = '../library';
$ENV{'DYLD_LIBRARY_PATH'} = '../library';
}
$ENV{'LD_LIBRARY_PATH'} = getcwd() . "/../library";
$ENV{'DYLD_LIBRARY_PATH'} = $ENV{'LD_LIBRARY_PATH'}; # For macOS
my $prefix = $^O eq "MSWin32" ? '' : './';