Author: sparky
Date: Thu Aug  3 04:09:10 2006
New Revision: 7571

Modified:
   toys/tools/gcc.wrapper
Log:
- filter-out false warnings yet better


Modified: toys/tools/gcc.wrapper
==============================================================================
--- toys/tools/gcc.wrapper      (original)
+++ toys/tools/gcc.wrapper      Thu Aug  3 04:09:10 2006
@@ -6,7 +6,11 @@
 # (c) 2006 PLD Linux Distribution
 # Licensed under GPL v2
 
+# no use strict by default to make it faster
+#use strict;
+
 my $ldflags = "-Wl,--as-needed -Wl,-s";
+# warning: glibc changes flags order
 my $cflags = "-fno-align-loops -fno-align-jumps -fno-align-functions";
 
 my $link = 1;
@@ -17,10 +21,10 @@
 foreach my $arg (@ARGV) {
        foreach my $nocomp (qw(
                        -E -MM --version -v -V --help --target-help
-                       -print-prog-name=ld -print-file-name=include 
-print-search-dirs
-                       -print-libgcc-file-name -dumpmachine
-                       conftest conftest.c conftest.cpp conftest.o gcctest.c 
try.c
-                       conftest_main.c conftest_main.o sub/conftest.o 
sub/conftest.c
+                       -print-search-dirs
+                       -print-libgcc-file-name -dumpmachine -dumpversion
+                       gcctest.c try.c
+                       /dev/null -Wp,-MD,scripts/basic/.split-include.d
                        -D__KERNEL__)) {
                if ($arg eq $nocomp) {
                        $link = 0;
@@ -28,10 +32,15 @@
                        last FORARGS;
                }
        }
-       if ($arg eq "-c" or $arg eq "-S") {
+       if ($arg eq "-c" or $arg eq "-S" or $arg eq "-nostartfiles") {
                $link = 0;
                next;
        }
+       if ($arg =~ /^-print-(prog|file)-name=/ or $arg =~ /conftest/) {
+               $link = 0;
+               $compile = 0;
+               last FORARGS;
+       }
        $source = 1 if $arg =~ /\.(c|cpp|cxx)$/;
 }
 $compile = 0 unless $source;
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to