We only want "linker input file unused" errors for -l options, because things like -Wl,-O1 break configure's -fPIC detection. diff -Nur gcc-3.4.4.orig/gcc/gcc.c gcc-3.4.4/gcc/gcc.c --- gcc-3.4.4.orig/gcc/gcc.c 2005-05-01 10:33:14.000000000 +0000 +++ gcc-3.4.4/gcc/gcc.c 2005-08-26 01:13:17.888827271 +0000 @@ -6447,7 +6447,7 @@ if (! linker_was_run && error_count == 0) for (i = 0; (int) i < n_infiles; i++) - if (explicit_link_files[i]) + if (explicit_link_files[i] && outfiles[i][0] == '-' && outfiles[i][1] == 'l') error ("%s: linker input file unused because linking not done", outfiles[i]);