generic.fns: fix duplicate compiler detection
authorBjörn Jacke <bj@sernet.de>
Wed, 1 Dec 2010 22:14:45 +0000 (23:14 +0100)
committerBjörn Jacke <bj@sernet.de>
Wed, 1 Dec 2010 22:17:30 +0000 (23:17 +0100)
"sum" on NetBSD outputs the filename - that's why `sum cc` and `sum gcc` where
*always* different :-)

generic.fns

index 702f830cb59f34618d0834024e6e27c96c3bec76..a19abdfb7623f2ba1fd63109ed33add111c027e6 100644 (file)
@@ -20,7 +20,7 @@ for compiler in gcc cc icc; do
 
     # We do not want to build with the same compiler twice
     # cc is a symlink to gcc on some systems
-    cur_compiler_sum="`sum $path`"
+    cur_compiler_sum="`sum $path | sed 's/ .*//'`"
     test x"$cur_compiler_sum" = x"" && {
        cur_compiler_sum="$path"
     }