diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2020-09-25 22:43:14 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2020-09-25 22:43:14 +0000 |
commit | 7fc1f569abf7c799c6334297ee020a01b5d3d71e (patch) | |
tree | 6494fa45d06ccd27128ac6675e338eb0ee59ac62 /crypto/openssl/Configure | |
parent | 2367fca656edb8ea52e6a2f7d8ef63e3a38966d6 (diff) | |
download | src-test2-7fc1f569abf7c799c6334297ee020a01b5d3d71e.tar.gz src-test2-7fc1f569abf7c799c6334297ee020a01b5d3d71e.zip |
MFS: r366176
Merge OpenSSL 1.1.1h.
Approved by: re (gjb)
Notes
Notes:
svn path=/releng/12.2/; revision=366177
Diffstat (limited to 'crypto/openssl/Configure')
-rwxr-xr-x | crypto/openssl/Configure | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/crypto/openssl/Configure b/crypto/openssl/Configure index 2e9efaa5f3da..1d73d06e1b3b 100755 --- a/crypto/openssl/Configure +++ b/crypto/openssl/Configure @@ -217,12 +217,22 @@ sub resolve_config; # Unified build supports separate build dir my $srcdir = catdir(absolutedir(dirname($0))); # catdir ensures local syntax my $blddir = catdir(absolutedir(".")); # catdir ensures local syntax + +# File::Spec::Unix doesn't detect case insensitivity, so we make sure to +# check if the source and build directory are really the same, and make +# them so. This avoids all kinds of confusion later on. +# We must check @File::Spec::ISA rather than using File::Spec->isa() to +# know if File::Spec ended up loading File::Spec::Unix. +$srcdir = $blddir + if (grep(/::Unix$/, @File::Spec::ISA) + && samedir($srcdir, $blddir)); + my $dofile = abs2rel(catfile($srcdir, "util/dofile.pl")); my $local_config_envname = 'OPENSSL_LOCAL_CONFIG_DIR'; -$config{sourcedir} = abs2rel($srcdir); -$config{builddir} = abs2rel($blddir); +$config{sourcedir} = abs2rel($srcdir, $blddir); +$config{builddir} = abs2rel($blddir, $blddir); # Collect reconfiguration information if needed my @argvcopy=@ARGV; @@ -1049,6 +1059,9 @@ if (scalar(@seed_sources) == 0) { print "Using os-specific seed configuration\n"; push @seed_sources, 'os'; } +if (scalar(grep { $_ eq 'egd' } @seed_sources) > 0) { + delete $disabled{'egd'}; +} if (scalar(grep { $_ eq 'none' } @seed_sources) > 0) { die "Cannot seed with none and anything else" if scalar(@seed_sources) > 1; warn <<_____ if scalar(@seed_sources) == 1; @@ -3424,6 +3437,27 @@ sub absolutedir { return realpath($dir); } +# Check if all paths are one and the same, using stat. They must both exist +# We need this for the cases when File::Spec doesn't detect case insensitivity +# (File::Spec::Unix assumes case sensitivity) +sub samedir { + die "samedir expects two arguments\n" unless scalar @_ == 2; + + my @stat0 = stat($_[0]); # First argument + my @stat1 = stat($_[1]); # Second argument + + die "Couldn't stat $_[0]" unless @stat0; + die "Couldn't stat $_[1]" unless @stat1; + + # Compare device number + return 0 unless ($stat0[0] == $stat1[0]); + # Compare "inode". The perl manual recommends comparing as + # string rather than as number. + return 0 unless ($stat0[1] eq $stat1[1]); + + return 1; # All the same +} + sub quotify { my %processors = ( perl => sub { my $x = shift; |