aboutsummaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2018-03-08 14:16:18 +0100
committerRichard Levitte <levitte@openssl.org>2018-03-08 17:24:02 +0100
commitb92013602b6666314ad200d48e10a1aaa2c5b2fa (patch)
tree2e30f705e2cdf97b3f88a706f803d23062c690cb /Configure
parent310f28df2e5317a96a4390117af17dab34706d67 (diff)
downloadopenssl-b92013602b6666314ad200d48e10a1aaa2c5b2fa.zip
openssl-b92013602b6666314ad200d48e10a1aaa2c5b2fa.tar.gz
openssl-b92013602b6666314ad200d48e10a1aaa2c5b2fa.tar.bz2
Configure: disallow the mixture of compiling flags and env / make variables
Note that this might give surprising results if someone forgets an environment variable that has been set previously. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5534)
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure20
1 files changed, 16 insertions, 4 deletions
diff --git a/Configure b/Configure
index bb951bd..1b6a7b6 100755
--- a/Configure
+++ b/Configure
@@ -621,10 +621,10 @@ while (@argvcopy)
{
$user{$1} = ref $user{$1} eq "ARRAY" ? [] : undef;
}
- if (exists $useradd{$1})
- {
- $useradd{$1} = [];
- }
+ #if (exists $useradd{$1})
+ # {
+ # $useradd{$1} = [];
+ # }
next;
}
@@ -891,6 +891,18 @@ while (@argvcopy)
}
}
+if (grep { scalar @$_ > 0 } values %useradd) {
+ my $detected_env = join(', ', grep { @{$useradd{$_}} || env($_) }
+ sort keys %useradd);
+ if ($detected_env) {
+ die <<"_____";
+***** Mixing env / make variables and additional compiler/linker flags as
+***** configure command line option is not permitted.
+***** Affected env / make variables: $detected_env
+_____
+ }
+}
+
foreach (keys %user) {
my $value = env($_);
$value //= defined $user_synonyms{$_} ? env($user_synonyms{$_}) : undef;