aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-09-04 15:11:39 +0000
committerlloyd <[email protected]>2006-09-04 15:11:39 +0000
commit25b8f9aff96c5b58198938e5b752f8008de42ae7 (patch)
tree5481c5ebb9957669078bcc48df3b5ecb299f74f0
parenta37cecb0a182a8d6dd0a2a181ec921296317e0fb (diff)
Finish get_cc_info()
-rwxr-xr-xconfigure.pl50
1 files changed, 29 insertions, 21 deletions
diff --git a/configure.pl b/configure.pl
index 7a44603ce..37474e10e 100755
--- a/configure.pl
+++ b/configure.pl
@@ -1871,6 +1871,23 @@ sub get_cc_info {
'debug_flags:no_debug_flags');
set_if($_, 'makefile_style', \$info{'makefile_style'});
+
+ read_hash($_, $reader, 'os', list_push(\@{$info{'os'}}));
+ read_hash($_, $reader, 'arch', list_push(\@{$info{'arch'}}));
+
+ read_hash($_, $reader, 'mach_abi_linking',
+ quoted_mapping(\%{$info{'mach_abi_linking'}}));
+ read_hash($_, $reader, 'so_link_flags',
+ quoted_mapping(\%{$info{'so_link_flags'}}));
+
+ read_hash($_, $reader, 'mach_opt',
+ sub {
+ my $line = $_[0];
+ $line =~ m/^(\S*) -> \"(.*)\" ?(.*)?$/;
+ $info{'mach_opt_flags'}{$1} = $2;
+ $info{'mach_opt_re'}{$1} = $3;
+ });
+
}
return %info;
}
@@ -1893,26 +1910,17 @@ sub set_cc_defines {
$CC_NO_DEBUG_FLAGS{$cc} = $info{'no_debug_flags'};
$MAKEFILE_STYLE{$cc} = $info{'makefile_style'};
- my $reader = make_reader(File::Spec->catfile($dir, $cc));
- while($_ = &$reader()) {
- read_hash($_, $reader, 'arch',
- list_push(\@{$CC_SUPPORTS_ARCH{$cc}}));
- read_hash($_, $reader, 'os',
- list_push(\@{$CC_SUPPORTS_OS{$cc}}));
-
- read_hash($_, $reader, 'mach_opt',
- sub {
- my $line = $_[0];
- $line =~ m/^(\S*) -> \"(.*)\" ?(.*)?$/;
- $CC_MACHINE_OPT_FLAGS{$cc}{$1} = $2;
- $CC_MACHINE_OPT_FLAGS_RE{$cc}{$1} = $3;
- });
-
- read_hash($_, $reader, 'mach_abi_linking',
- quoted_mapping(\%{$CC_ABI_FLAGS{$cc}}));
-
- read_hash($_, $reader, 'so_link_flags',
- quoted_mapping(\%{$CC_SO_LINK_FLAGS{$cc}}));
- }
+ @{$CC_SUPPORTS_ARCH{$cc}} = @{$info{'arch'}};
+ @{$CC_SUPPORTS_OS{$cc}} = @{$info{'os'}};
+
+ %{$CC_ABI_FLAGS{$cc}} = %{$info{'mach_abi_linking'}}
+ if(defined($info{'mach_abi_linking'}));
+ %{$CC_SO_LINK_FLAGS{$cc}} = %{$info{'so_link_flags'}}
+ if(defined($info{'so_link_flags'}));
+
+ %{$CC_MACHINE_OPT_FLAGS{$cc}} = %{$info{'mach_opt_flags'}}
+ if(defined($info{'mach_opt_flags'}));
+ %{$CC_MACHINE_OPT_FLAGS_RE{$cc}} = %{$info{'mach_opt_re'}}
+ if(defined($info{'mach_opt_re'}));
}
}