Subject: GCC 3 & kernel
To: None <port-macppc@NetBSD.ORG>
From: Jeff Laughlin <jlaughli@vtc.edu>
List: port-macppc
Date: 03/10/2002 14:00:57
I haven't actually gotten much farther, but I wrote a neat perl utility. I 
replaced the normal CC command in the make file with this perl program. It 
tries to compile with GCC 3 and then automatically falls back to GCC if 
that fails, and returns an appropriate value to the make file. 
Unfortunately the partial-GCC3 kernel still crashes on boot. Oh well.
-Jeff

#!/usr/bin/perl -w

$gcc3 = '/usr/local/gcc3/bin/gcc';
$gcc = 'gcc';

$args = join(' ', @ARGV);
if ( system("$gcc3 -fno-builtin $args") != 0 )
{
   if ( system("$gcc $args") != 0 )
   {
     die "Compile failed!";
   }
}
print "Compile sucessful!\n";
exit 0;