X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=Configure;h=9e9f100a71c1d037711ed77236d08011b8fa0205;hp=d8ea689d704f2029d6e0adfd265f2cd6c725ea0f;hb=a1d3f3d1d0711eeece52f132e73b533d814770ac;hpb=8b527be2db48064673640dda2d57edc6b362ae64 diff --git a/Configure b/Configure index d8ea689d70..9e9f100a71 100755 --- a/Configure +++ b/Configure @@ -1,6 +1,6 @@ -: -eval 'exec perl -S $0 ${1+"$@"}' - if $running_under_some_shell; +#! /usr/bin/env perl +# -*- mode: perl; -*- + ## ## Configure -- OpenSSL source tree configuration script ## If editing this file, run this command before committing @@ -108,6 +108,11 @@ my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare # -Wextended-offsetof my $clang_devteam_warn = "-Wno-unused-parameter -Wno-missing-field-initializers -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Qunused-arguments -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations"; +# These are used in addition to $gcc_devteam_warn unless this is a mingw build. +# This adds backtrace information to the memory leak info. +my $memleak_devteam_backtrace = "-rdynamic -DCRYPTO_MDEBUG_BACKTRACE"; + + my $strict_warnings = 0; my $x86_gcc_des="DES_PTR DES_RISC1 DES_UNROLL"; @@ -947,6 +952,7 @@ while($argv_unprocessed) $argvstring=join(' ',@argvcopy); PROCESS_ARGS: + my %unsupported_options = (); foreach (@argvcopy) { s /^-no-/no-/; # some people just can't read the instructions @@ -963,7 +969,7 @@ PROCESS_ARGS: my $word = $2; if (!grep { $word =~ /^${_}$/ } @disablables) { - warn "Unsupported option ${word}, ignored...\n"; + $unsupported_options{$_} = 1; next; } } @@ -1135,6 +1141,12 @@ PROCESS_ARGS: { $options .= " ".$_; } } } + + if (keys %unsupported_options) + { + die "***** Unsupported options: ", + join(", ", keys %unsupported_options), "\n"; + } } @@ -1733,13 +1745,20 @@ if ($strict_warnings) die "ERROR --strict-warnings requires gcc or clang" unless ($ecc =~ /gcc(-\d(\.\d)*)?$/ or $ecc =~ /clang$/); foreach $wopt (split /\s+/, $gcc_devteam_warn) { - $cflags .= " $wopt" unless ($cflags =~ /$wopt/) + $cflags .= " $wopt" unless ($cflags =~ /(^|\s)$wopt(\s|$)/) } if ($ecc eq "clang") { foreach $wopt (split /\s+/, $clang_devteam_warn) { - $cflags .= " $wopt" unless ($cflags =~ /$wopt/) + $cflags .= " $wopt" unless ($cflags =~ /(^|\s)$wopt(\s|$)/) + } + } + if ($target !~ /^mingw/) + { + foreach $wopt (split /\s+/, $memleak_devteam_backtrace) + { + $cflags .= " $wopt" unless ($cflags =~ /(^|\s)$wopt(\s|$)/) } } }