This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug driver/29270] "--" does not end option parsing
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Sep 2006 15:04:41 -0000
- Subject: [Bug driver/29270] "--" does not end option parsing
- References: <bug-29270-50@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29270