From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 962503857023; Sun, 4 Apr 2021 02:02:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 962503857023 From: "vries at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug driver/99896] g++ drops -lc Date: Sun, 04 Apr 2021 02:02:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: driver X-Bugzilla-Version: 10.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2021 02:02:55 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99896 Tom de Vries changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matz at suse dot de --- Comment #6 from Tom de Vries --- (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.=20 >=20 > OK, it's dropped because it's always present at the end. >=20 > 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: >=20 > "If a standard system include directory, or a directory specified with > -isystem, is also specified with -I, the -I option is ignored." >=20 >=20=20 > > Um, for my understanding, does that mean you agree this is a bug in g++? >=20 > No. >=20 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.=20 ... 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.=