X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=util%2Fselftest.pl;h=83fd9f87b94a32e1e30954025d609fa6944c0131;hb=c1497b4d19fd6796469d2a3521eec5ad583e923f;hp=f6ccfded268eb027865f29e4ab32e4bc23b63271;hpb=c7fecee8b5e3a07746358af8c0f7610a3ed213bd;p=oweals%2Fopenssl.git diff --git a/util/selftest.pl b/util/selftest.pl index f6ccfded26..83fd9f87b9 100644 --- a/util/selftest.pl +++ b/util/selftest.pl @@ -19,6 +19,7 @@ my $ok=0; my $cc="cc"; my $cversion="??"; my $sep="-----------------------------------------------------------------------------\n"; +my $not_our_fault="\nPlease ask your system administrator/vendor for more information.\n[Problems with your operating system setup should not be reported\nto the OpenSSL project.]\n"; open(OUT,">$report") or die; @@ -49,6 +50,7 @@ if (open(IN,"&1`; $cversion=`$cc -V 2>&1` if $cversion =~ "usage"; +$cversion=`$cc -V |head -1` if $cversion =~ "Error"; $cversion=`$cc --version` if $cversion eq ""; $cversion =~ s/Reading specs.*\n//; $cversion =~ s/usage.*\n//; @@ -76,16 +78,18 @@ print OUT "\n"; print "Checking compiler...\n"; if (open(TEST,">cctest.c")) { - print TEST "#include \nmain(){printf(\"Hello world\\n\");}\n"; + print TEST "#include \n#include \nmain(){printf(\"Hello world\\n\");}\n"; close(TEST); system("$cc -o cctest cctest.c"); if (`./cctest` !~ /Hello world/) { print OUT "Compiler doesn't work.\n"; + print OUT $not_our_fault; goto err; } - system("ar r cctest.a"); + system("ar r cctest.a /dev/null"); if (not -f "cctest.a") { - print OUT "Check your linker (ar).\n"; + print OUT "Check your archive tool (ar).\n"; + print OUT $not_our_fault; goto err; } } else { @@ -102,6 +106,7 @@ if (open(TEST,">cctest.c")) { } else { print OUT "Can't compile test program!\n"; } + print OUT $not_our_fault; goto err; } } else { @@ -127,6 +132,8 @@ if (system("make 2>&1 | tee make.log") > 255) { $_=$options; s/no-asm//; +s/no-shared//; +s/no-krb5//; if (/no-/) { print OUT "Test skipped.\n";