perl.cvs.parrot
[Top] [All Lists]

[svn:parrot] r20615 - trunk/config/auto

Subject: [svn:parrot] r20615 - trunk/config/auto
From:
Date: Sun, 12 Aug 2007 22:23:25 -0700 PDT
Newsgroups: perl.cvs.parrot

Author: petdance
Date: Sun Aug 12 22:23:24 2007
New Revision: 20615

Modified:
   trunk/config/auto/attributes.pm

Log:
Check the test.cco files for errors or warnings from the tested attributes.  
This should quiet all the __warn_unused_result__ noise

Modified: trunk/config/auto/attributes.pm
==============================================================================
--- trunk/config/auto/attributes.pm     (original)
+++ trunk/config/auto/attributes.pm     Sun Aug 12 22:23:24 2007
@@ -58,6 +58,8 @@
 sub try_attr {
     my ( $self, $conf, $attr ) = @_;
 
+    my $output_file = 'test.cco';
+
     $verbose and print "trying attribute '$attr'$/";
 
     my $cc = $conf->option_or_data( 'cc' );
@@ -71,12 +73,17 @@
 
     # Don't use cc_build, because failure is expected.
     my $exit_code = Parrot::Configure::Step::_run_command(
-        $command_line, 'test.cco', 'test.cco' );
+        $command_line, $output_file, $output_file );
     $verbose and print "  exit code: $exit_code$/";
 
     return if $exit_code;
 
-    $conf->data->set( ccflags => $tryflags );
+    use Parrot::Test;
+    my $output = Parrot::Test::slurp_file( $output_file );
+
+    if ( $output !~ /error|warning/i ) {
+        $conf->data->set( ccflags => $tryflags );
+    }
 
     return;
 }

<Prev in Thread] Current Thread [Next in Thread>
  • [svn:parrot] r20615 - trunk/config/auto, petdance <=