diff options
author | lloyd <[email protected]> | 2007-10-20 22:22:51 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2007-10-20 22:22:51 +0000 |
commit | a7cbee7e00b0056373fb5c0859cb434b56c19997 (patch) | |
tree | 57923cbce77ba88119365d5cb52c89e2fcfff2f4 /configure.pl | |
parent | e47e3a1f34896968ba1a68be5e8ac12c7b4adeac (diff) |
Don't use -fpermissive on 64-bit systems (arch matching alpha or *64),
since we only need it because of that stupid GCC long long warning,
and that doesn't show up on 64-bit machines.
Diffstat (limited to 'configure.pl')
-rwxr-xr-x | configure.pl | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/configure.pl b/configure.pl index c204f0bbe..11718829c 100755 --- a/configure.pl +++ b/configure.pl @@ -95,7 +95,7 @@ sub main { $$config{'lib_prefix'} = ''; } - choose_target($config, $target); + choose_target($config); my $os = $$config{'os'}; my $cc = $$config{'compiler'}; @@ -180,7 +180,7 @@ sub croak { } sub warning { - warn with_diagnostic('note', @_); + warn with_diagnostic('warning', @_); } sub autoconfig { @@ -241,7 +241,8 @@ sub display_help { my $cpus = &$listing(keys %CPU); my $helptxt = <<ENDOFHELP; -Usage for $0 (Botan $VERSION_STRING) + +Usage for $0 (Botan $VERSION_STRING): To change where the library is installed: @@ -347,27 +348,24 @@ sub choose_target { $gcc_version = '' if not defined $gcc_version; - # Some versions of GCC are a little buggy dealing with - # long long in C++. The last check is because on Cygwin - # (at least for me) gcc_version doesn't get the output, - # maybe something to do with the stderr redirection? If - # it's Cygwin and we didn't get output, assume it's a - # buggy GCC. There is no reduction in code quality so even - # if we're wrong it's OK. - - if(($gcc_version =~ /4\.[01]/) || ($gcc_version =~ /3\.[34]/) || - ($gcc_version =~ /2\.95\.[0-4]/) || - ($gcc_version eq '' && $^O eq 'cygwin')) + my $has_ll_bug = 0; + $has_ll_bug = 1 if($gcc_version =~ /4\.[0123]/); + $has_ll_bug = 1 if($gcc_version =~ /3\.[34]/); + $has_ll_bug = 1 if($gcc_version =~ /2\.25\.[0-4]/); + $has_ll_bug = 1 if($gcc_version eq ''); + + $has_ll_bug = 0 if($arch eq 'alpha' or $arch =~ /.*64$/); + + if($has_ll_bug) { warning('Enabling -fpermissive to work around ', 'possible GCC bug'); $$config{'gcc_bug'} = 1; } - if($gcc_version =~ /2\.95\.[0-4]/) - { - warning('GCC 2.95.x issues many spurious warnings'); - } + + warning('GCC 2.95.x issues many spurious warnings') + if($gcc_version =~ /2\.95\.[0-4]/); } } @@ -455,8 +453,9 @@ sub get_options { my $mod_str = join(',', @modules); - return ('', $mod_str) if($#ARGV == -1); - return ($ARGV[0], $mod_str) if($#ARGV == 0); + return $mod_str if($#ARGV == -1); + + warning("Unknown options $ARGV[0]"); display_help(); } |