contents of test.c: int main(int argc,char* argv[]) { return 0; } now run: "gcc test.c -o test" works fine and produces test "gcc test.c -o test -o test2" works fine and produces test2 "gcc -c test.c -o test.o" works fine and produces test.o "gcc -c test.c -o test.o -o test2.o" fails with: cc1: error: unrecognized option `-strip' cc1: error: output filename specified twice I don't know if this is a bug from one of our patches, or an upstream bug. This is the cause of bug #31823, which happens on 3.3.1-r3 and gcc-3.3.2-r2 for definite. Reproducible: Always Steps to Reproduce: Expected Results: it should compile fine!
doesn't happen with gcc-3.2
bug tracing: build a stock gcc-3.3.2 in it's 'gcc' dir do: PATH=".:/bin:/sbin:/usr/bin:/usr/sbin" ./xgcc -c test.c -o test.o -v provides this output: Using built-in specs. Configured with: ./configure --disable-libgcj --enable-languages=c Thread model: posix gcc version 3.3.2 cc1 -quiet -v -iprefix ./../lib/gcc-lib/i686-pc-linux-gnu/3.3.2/ -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=2 test.c -quiet -dumpbase test.c -auxbase-strip test.o -version -o /tmp/ccAAaDYD.s GNU C version 3.3.2 (i686-pc-linux-gnu) compiled by GNU C version 3.3.2. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring nonexistent directory "../lib/gcc-lib/i686-pc-linux-gnu/3.3.2/include" ignoring nonexistent directory "../lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/include" ignoring nonexistent directory "NONE/include" ignoring nonexistent directory "/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/include" ignoring nonexistent directory "/usr/local/i686-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/include End of search list. as -V -Qy -o test.o /tmp/ccAAaDYD.s GNU assembler version 2.14.90.0.7 (i686-pc-linux-gnu) using BFD version 2.14.90.0.7 20031029 now: PATH=".:/bin:/sbin:/usr/bin:/usr/sbin" ./xgcc -c test.c -o test.o -o test2.o -v and get: Using built-in specs. Configured with: ./configure --disable-libgcj --enable-languages=c Thread model: posix gcc version 3.3.2 cc1 -quiet -v -iprefix ./../lib/gcc-lib/i686-pc-linux-gnu/3.3.2/ -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=2 test.c -quiet -dumpbase test.c -auxbase-strip test.o -strip test2.o -version -o /tmp/ccDKgzen.s cc1: error: unrecognized option `-strip' cc1: error: output filename specified twice GNU C version 3.3.2 (i686-pc-linux-gnu) compiled by GNU C version 3.3.2. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 and that shows us the source of '-strip'!
this needs to be passed upstream to the gcc people.
upstream report at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13577
resolved upstream in 3.4 and 3.3.4