Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 32763 - GCC with -c and two -o parameters fails with unrecognized option `-strip'
Summary: GCC with -c and two -o parameters fails with unrecognized option `-strip'
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: Highest critical (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-04 19:50 UTC by Robin Johnson
Modified: 2004-07-11 13:49 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-11-04 19:50:41 UTC
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!
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-11-04 19:53:29 UTC
doesn't happen with gcc-3.2
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-11-04 20:29:13 UTC
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'!
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-11-04 20:40:23 UTC
this needs to be passed upstream to the gcc people.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-01-05 17:40:43 UTC
upstream report at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13577
Comment 5 Travis Tilley (RETIRED) gentoo-dev 2004-07-11 13:49:31 UTC
resolved upstream in 3.4 and 3.3.4