gcc   [plain text]


#!/usr/bin/perl

use strict;
use File::Basename ();

my $MyName = File::Basename::basename($0);

if(grep(/^-no64$/, @ARGV)) {
    my $gotarch = 0;
    my @args;
    for(@ARGV) {
	if($gotarch) {
	    push(@args, '-arch', $_) unless /64$/;
	    $gotarch = 0;
	    next;
	}
	if($_ eq '-arch') {
	    $gotarch++;
	    next;
	}
	next if $_ eq '-no64';
	push(@args, $_);
    }
    @ARGV = @args;
    print "===>/usr/bin/$MyName @ARGV\n";
}

exec "/usr/bin/$MyName", @ARGV;