[Bug driver/29270] "--" does not end option parsing

joseph at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Thu Sep 28 15:04:00 GMT 2006

------- Comment #3 from joseph at codesourcery dot com  2006-09-28 15:04 -------
Subject: Re:  "--" does not end option parsing

On Thu, 28 Sep 2006, pinskia at gcc dot gnu dot org wrote:

> Hmm, one problem is that we need to know when we should pass -- on to cc1, etc.
> also.  For an example:
> gcc t.c -- -l.c
> is that -l.c a c source or a library for ld to have at and how do we invoke ld
> then:
> with "-- -l.c" or just "-l.c"

It's a source file - everything after -- should be a source or object file 
according to the suffix.  -lfoo would mean that an object file called 
literally -lfoo is to be linked, not libfoo.a.  You could either pass -- 
to ld or change -lfoo to ./-lfoo.



More information about the Gcc-bugs mailing list