summaryrefslogtreecommitdiffstats
path: root/Configure
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-04-23 09:24:38 +0200
committerRichard Levitte <levitte@openssl.org>2019-04-23 12:44:38 +0200
commitb8fdfd93f81fab35b8802d39ea2f421eabf4c605 (patch)
treeabc40ce363165e97e0b878ee8169a36cbc263ca7 /Configure
parent1711a62686e3d55767ba067a4fd1a18ceec69d3f (diff)
Configure: merge all of %user and %useradd into %config earlier
This came about with the realisation that upper case CFLAGS, LDFLAGS and so on aren't treated much after that, and this makes figuring out user added flags significantly easier, just look in %config. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8812) (cherry picked from commit c1a09254e4c763b62811bc412afa1498699fce50)
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure44
1 files changed, 22 insertions, 22 deletions
diff --git a/Configure b/Configure
index 114ee9bf72..cba080a99b 100755
--- a/Configure
+++ b/Configure
@@ -1179,6 +1179,22 @@ foreach (keys %user) {
delete $config{$_} unless defined $config{$_};
}
+# Finish up %config by appending things the user gave us on the command line
+# apart from "make variables"
+foreach (keys %useradd) {
+ # The must all be lists, so we assert that here
+ die "internal error: \$useradd{$_} isn't an ARRAY\n"
+ unless ref $useradd{$_} eq 'ARRAY';
+
+ if (defined $config{$_}) {
+ push @{$config{$_}}, @{$useradd{$_}};
+ } else {
+ $config{$_} = [ @{$useradd{$_}} ];
+ }
+}
+# At this point, we can forget everything about %user and %useradd,
+# because it's now all been merged into the corresponding $config entry
+
# Allow overriding the build file name
$config{build_file} = env('BUILDFILE') || $target{build_file} || "Makefile";
@@ -1255,8 +1271,7 @@ if ($target =~ /^mingw/ && `$config{CC} --target-help 2>&1` =~ m/-mno-cygwin/m)
}
if ($target =~ /linux.*-mips/ && !$disabled{asm}
- && !grep { $_ !~ /-m(ips|arch=)/ } (@{$user{CFLAGS}},
- @{$useradd{CFLAGS}})) {
+ && !grep { $_ !~ /-m(ips|arch=)/ } (@{$config{CFLAGS}})) {
# minimally required architecture flags for assembly modules
my $value;
$value = '-mips2' if ($target =~ /mips32/);
@@ -1281,8 +1296,7 @@ unless ($disabled{threads}) {
# system-dependent compiler options that are necessary. We
# can't truly check that the given options are correct, but
# we expect the user to know what [s]He is doing.
- if (!@{$user{CFLAGS}} && !@{$useradd{CFLAGS}}
- && !@{$user{CPPDEFINES}} && !@{$useradd{CPPDEFINES}}) {
+ if (!@{$config{CFLAGS}} && !@{$config{CPPDEFINES}}) {
die "You asked for multi-threading support, but didn't\n"
,"provide any system-specific compiler options\n";
}
@@ -1548,10 +1562,10 @@ if ($strict_warnings)
}
foreach my $idx (qw(CFLAGS CXXFLAGS))
{
- $useradd{$idx} = [ map { $_ eq '--ossl-strict-warnings'
- ? @{$strict_warnings_collection{$idx}}
- : ( $_ ) }
- @{$useradd{$idx}} ];
+ $config{$idx} = [ map { $_ eq '--ossl-strict-warnings'
+ ? @{$strict_warnings_collection{$idx}}
+ : ( $_ ) }
+ @{$config{$idx}} ];
}
unless ($disabled{"crypto-mdebug-backtrace"})
@@ -1594,20 +1608,6 @@ unless ($disabled{afalgeng}) {
push @{$config{openssl_other_defines}}, "OPENSSL_NO_AFALGENG" if ($disabled{afalgeng});
-# Finish up %config by appending things the user gave us on the command line
-# apart from "make variables"
-foreach (keys %useradd) {
- # The must all be lists, so we assert that here
- die "internal error: \$useradd{$_} isn't an ARRAY\n"
- unless ref $useradd{$_} eq 'ARRAY';
-
- if (defined $config{$_}) {
- push @{$config{$_}}, @{$useradd{$_}};
- } else {
- $config{$_} = [ @{$useradd{$_}} ];
- }
-}
-
# ALL MODIFICATIONS TO %config and %target MUST BE DONE FROM HERE ON
# If we use the unified build, collect information from build.info files