[Bug driver/99896] g++ drops -lc
vries at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Apr 4 02:02:52 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99896
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |matz at suse dot de
--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #4)
> (In reply to Tom de Vries from comment #2)
> > I don't understand. AFAICT, it's dropped. It's not moved to the end,
> > because -lc is already at the end without specifying -lc.
>
> OK, it's dropped because it's always present at the end.
>
> This is similar to adding -I/usr/include which gets ignored, because it's
> already going to be searched anyway as a system header directory. Quoting
> the manual:
>
> "If a standard system include directory, or a directory specified with
> -isystem, is also specified with -I, the -I option is ignored."
>
>
> > Um, for my understanding, does that mean you agree this is a bug in g++?
>
> No.
>
OK, so here ( https://gcc.gnu.org/onlinedocs/gcc/Invoking-GCC.html#Invoking-GCC
) I read:
...
Also, the placement of the -l option is significant.
...
So, if the documentation of gcc says that placement of the -l option is
significant, then why does g++ decide to mess with that? ISTM g++ violates
documented behaviour.
More information about the Gcc-bugs
mailing list