From b6f18d3851ef06ee4f690d81b6c878085219a7ba Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Thu, 28 Feb 2019 13:28:43 +0100 Subject: [PATCH] Configure: make C++ build tests optional and configurable Disabled by default Fixes #8360 Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/8370) (cherry picked from commit ac4033d658e4dc210ed4552b88069b57532ba3d7) --- CHANGES | 8 ++++++++ Configure | 4 +++- test/build.info | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 53f856393e..90937e1eac 100644 --- a/CHANGES +++ b/CHANGES @@ -9,6 +9,14 @@ Changes between 1.1.1b and 1.1.1c [xx XXX xxxx] + *) Added build tests for C++. These are generated files that only do one + thing, to include one public OpenSSL head file each. This tests that + the public header files can be usefully included in a C++ application. + + This test isn't enabled by default. It can be enabled with the option + 'enable-buildtest-c++'. + [Richard Levitte] + *) Change the default RSA, DSA and DH size to 2048 bit instead of 1024. This changes the size when using the genpkey app when no size is given. It fixes an omission in earlier changes that changed all RSA, DSA and DH diff --git a/Configure b/Configure index f0892c20c0..b220337964 100755 --- a/Configure +++ b/Configure @@ -332,6 +332,7 @@ my @disablables = ( "autoload-config", "bf", "blake2", + "buildtest-c++", "camellia", "capieng", "cast", @@ -432,6 +433,7 @@ my %deprecated_disablables = ( our %disabled = ( # "what" => "comment" "asan" => "default", + "buildtest-c++" => "default", "crypto-mdebug" => "default", "crypto-mdebug-backtrace" => "default", "devcryptoeng" => "default", @@ -1167,7 +1169,7 @@ my %disabled_info = (); # For configdata.pm foreach my $what (sort keys %disabled) { $config{options} .= " no-$what"; - if (!grep { $what eq $_ } ( 'threads', 'shared', 'pic', + if (!grep { $what eq $_ } ( 'buildtest-c++', 'threads', 'shared', 'pic', 'dynamic-engine', 'makedepend', 'zlib-dynamic', 'zlib', 'sse2' )) { (my $WHAT = uc $what) =~ s|-|_|g; diff --git a/test/build.info b/test/build.info index 22a7d199a5..a2fb0e2e1e 100644 --- a/test/build.info +++ b/test/build.info @@ -585,7 +585,7 @@ ENDIF INCLUDE[buildtest_c_$name]=../include DEPEND[buildtest_c_$name]=../libssl ../libcrypto _____ - $OUT .= <<"_____" if $config{CXX}; + $OUT .= <<"_____" if $config{CXX} && !$disabled{"buildtest-c++"}; PROGRAMS_NO_INST=buildtest_cc_$name SOURCE[buildtest_cc_$name]=buildtest_$name.cc -- 2.25.1