X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=Configure;h=b30b57f209b69fa28247caf31d1c29ffb11c23ab;hp=bd49a895bd12cb4802e642d15b70de51b80923fe;hb=61884b8140893cb75c62f7303df67291ada360fe;hpb=878f42251b1798c724d8d3f360851d59435772bd diff --git a/Configure b/Configure index bd49a895bd..b30b57f209 100755 --- a/Configure +++ b/Configure @@ -311,6 +311,7 @@ my @disablables = ( "md2", "md4", "mdc2", + "msan", "multiblock", "nextprotoneg", "ocb", @@ -364,11 +365,15 @@ my %deprecated_disablables = ( our %disabled = ( # "what" => "comment" "asan" => "default", + "crypto-mdebug" => "default", + "crypto-mdebug-backtrace" => "default", "ec_nistp_64_gcc_128" => "default", "egd" => "default", "fuzz-libfuzzer" => "default", "fuzz-afl" => "default", + "heartbeats" => "default", "md2" => "default", + "msan" => "default", "rc5" => "default", "sctp" => "default", "ssl-trace" => "default", @@ -379,9 +384,6 @@ our %disabled = ( # "what" => "comment" "weak-ssl-ciphers" => "default", "zlib" => "default", "zlib-dynamic" => "default", - "crypto-mdebug" => "default", - "crypto-mdebug-backtrace" => "default", - "heartbeats" => "default", ); # Note: => pair form used for aesthetics, not to truly make a hash table @@ -435,10 +437,12 @@ my @disable_cascades = ( # no-autoalginit is only useful when building non-shared "autoalginit" => [ "shared", "apps" ], - "stdio" => [ "apps" ], + "stdio" => [ "apps", "capieng" ], "apps" => [ "tests" ], "comp" => [ "zlib" ], sub { !$disabled{"unit-test"} } => [ "heartbeats" ], + + sub { !$disabled{"msan"} } => [ "asm" ], ); # Avoid protocol support holes. Also disable all versions below N, if version @@ -496,7 +500,7 @@ if (grep /^reconf(igure)?$/, @argvcopy) { if (grep(/^reconf/,@argvcopy)); $ENV{CROSS_COMPILE} = $configdata::config{cross_compile_prefix} if defined($configdata::config{cross_compile_prefix}); - $ENV{CROSS_COMPILE} = $configdata::config{cc} + $ENV{CC} = $configdata::config{cc} if defined($configdata::config{cc}); print "Reconfiguring with: ", join(" ",@argvcopy), "\n"; @@ -721,6 +725,13 @@ foreach (@argvcopy) { $libs.=$_." "; } + elsif (/^-static$/) + { + $libs.=$_." "; + $disabled{"pic"} = "forced"; + $disabled{"shared"} = "forced"; + $disabled{"threads"} = "forced"; + } elsif (/^-D(.*)$/) { push @user_defines, $1; @@ -927,6 +938,9 @@ $target{nm} = $ENV{'NM'} || $target{nm} || "nm"; $target{rc} = $ENV{'RC'} || $ENV{'WINDRES'} || $target{rc} || "windres"; +# Cache the C compiler command for reconfiguration +$config{cc} = $target{cc}; + # For cflags, lflags, plib_lflags, ex_libs and defines, add the debug_ # or release_ attributes. # Do it in such a way that no spurious space is appended (hence the grep). @@ -1063,8 +1077,12 @@ unless ($disabled{ubsan}) { $config{cflags} .= "-fsanitize=undefined -fno-sanitize-recover=all "; } +unless ($disabled{msan}) { + $config{cflags} .= "-fsanitize=memory "; +} + unless ($disabled{"fuzz-libfuzzer"} && $disabled{"fuzz-afl"} - && $disabled{asan} && $disabled{ubsan}) { + && $disabled{asan} && $disabled{ubsan} && $disabled{msan}) { $config{cflags} .= "-fno-omit-frame-pointer -g "; } # @@ -1360,9 +1378,13 @@ if ($builder eq "unified") { my $f = $_->[1]; # The basic things we're trying to build my @programs = (); + my @programs_install = (); my @libraries = (); + my @libraries_install = (); my @engines = (); + my @engines_install = (); my @scripts = (); + my @scripts_install = (); my @extra = (); my @overrides = (); my @intermediates = (); @@ -1426,18 +1448,42 @@ if ($builder eq "unified") { qr/^\s*ENDIF\s*$/ => sub { die "ENDIF out of scope" if ! @skip; pop @skip; }, - qr/^\s*PROGRAMS\s*=\s*(.*)\s*$/ - => sub { push @programs, tokenize($1) - if !@skip || $skip[$#skip] > 0 }, - qr/^\s*LIBS\s*=\s*(.*)\s*$/ - => sub { push @libraries, tokenize($1) - if !@skip || $skip[$#skip] > 0 }, - qr/^\s*ENGINES\s*=\s*(.*)\s*$/ - => sub { push @engines, tokenize($1) - if !@skip || $skip[$#skip] > 0 }, - qr/^\s*SCRIPTS\s*=\s*(.*)\s*$/ - => sub { push @scripts, tokenize($1) - if !@skip || $skip[$#skip] > 0 }, + qr/^\s*PROGRAMS(_NO_INST)?\s*=\s*(.*)\s*$/ + => sub { + if (!@skip || $skip[$#skip] > 0) { + my $install = $1; + my @x = tokenize($2); + push @programs, @x; + push @programs_install, @x unless $install; + } + }, + qr/^\s*LIBS(_NO_INST)?\s*=\s*(.*)\s*$/ + => sub { + if (!@skip || $skip[$#skip] > 0) { + my $install = $1; + my @x = tokenize($2); + push @libraries, @x; + push @libraries_install, @x unless $install; + } + }, + qr/^\s*ENGINES(_NO_INST)?\s*=\s*(.*)\s*$/ + => sub { + if (!@skip || $skip[$#skip] > 0) { + my $install = $1; + my @x = tokenize($2); + push @engines, @x; + push @engines_install, @x unless $install; + } + }, + qr/^\s*SCRIPTS(_NO_INST)?\s*=\s*(.*)\s*$/ + => sub { + if (!@skip || $skip[$#skip] > 0) { + my $install = $1; + my @x = tokenize($2); + push @scripts, @x; + push @scripts_install, @x unless $install; + } + }, qr/^\s*EXTRA\s*=\s*(.*)\s*$/ => sub { push @extra, tokenize($1) if !@skip || $skip[$#skip] > 0 }, @@ -1523,6 +1569,14 @@ if ($builder eq "unified") { $unified_info{programs}->{$program} = 1; } + foreach (@programs_install) { + my $program = cleanfile($buildd, $_, $blddir); + if ($unified_info{rename}->{$program}) { + $program = $unified_info{rename}->{$program}; + } + $unified_info{install}->{programs}->{$program} = 1; + } + foreach (@libraries) { my $library = cleanfile($buildd, $_, $blddir); if ($unified_info{rename}->{$library}) { @@ -1531,6 +1585,14 @@ if ($builder eq "unified") { $unified_info{libraries}->{$library} = 1; } + foreach (@libraries_install) { + my $library = cleanfile($buildd, $_, $blddir); + if ($unified_info{rename}->{$library}) { + $library = $unified_info{rename}->{$library}; + } + $unified_info{install}->{libraries}->{$library} = 1; + } + die <<"EOF" if scalar @engines and !$config{dynamic_engines}; ENGINES can only be used if configured with 'dynamic-engine'. This is usually a fault in a build.info file. @@ -1543,6 +1605,14 @@ EOF $unified_info{engines}->{$library} = 1; } + foreach (@engines_install) { + my $library = cleanfile($buildd, $_, $blddir); + if ($unified_info{rename}->{$library}) { + $library = $unified_info{rename}->{$library}; + } + $unified_info{install}->{engines}->{$library} = 1; + } + foreach (@scripts) { my $script = cleanfile($buildd, $_, $blddir); if ($unified_info{rename}->{$script}) { @@ -1551,6 +1621,14 @@ EOF $unified_info{scripts}->{$script} = 1; } + foreach (@scripts_install) { + my $script = cleanfile($buildd, $_, $blddir); + if ($unified_info{rename}->{$script}) { + $script = $unified_info{rename}->{$script}; + } + $unified_info{install}->{scripts}->{$script} = 1; + } + foreach (@extra) { my $extra = cleanfile($buildd, $_, $blddir); $unified_info{extra}->{$extra} = 1; @@ -1749,7 +1827,7 @@ EOF $unified_info{$_} = [ sort keys %{$unified_info{$_}} ]; } # Two level structures - foreach my $l1 (("sources", "shared_sources", "ldadd", "depends")) { + foreach my $l1 (("install", "sources", "shared_sources", "ldadd", "depends")) { foreach my $l2 (sort keys %{$unified_info{$l1}}) { $unified_info{$l1}->{$l2} = [ sort keys %{$unified_info{$l1}->{$l2}} ];