public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Yeting Kuo <fakepaper56@gmail.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: G++ driver missing option when sending to collect2
Date: Thu, 25 Feb 2021 07:23:16 +0000	[thread overview]
Message-ID: <CAH6eHdSrzoAf3yexPkVCzavTykQh_jO6Ufc+b8FQJXXeFkZezQ@mail.gmail.com> (raw)
In-Reply-To: <CAGhUdNi=2KqMBqTQ+jFGviYZzaFXmmBui+0-6LCGM85u6we-Zg@mail.gmail.com>

On Thu, 25 Feb 2021, 02:46 Yeting Kuo via Gcc-help, <gcc-help@gcc.gnu.org>
wrote:

> Hi all,
> I have a compiler driver issue when using g++. I want to check whether it
> is a bug.
> I send '-Wl,--start-group x.o -lc -Wl,--end-group' to g++, but the command
> collect2 received is '--start-group x.o --end-group' like the following
> commands:
>


Does it cause a problem? The g++ driver automatically links to libstdc++
and that depends on libc, so the -lc argument has to be after -lstdc++.
Otherwise for static linking the linker could open libc.a before it knows
about the symbols that libstdc++.a needs from it.

  reply	other threads:[~2021-02-25  7:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-25  2:13 Yeting Kuo
2021-02-25  7:23 ` Jonathan Wakely [this message]
2021-02-26  1:57   ` Yeting Kuo
2021-02-26 19:15 ` Jim Wilson
2021-03-02 11:41   ` Yeting Kuo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAH6eHdSrzoAf3yexPkVCzavTykQh_jO6Ufc+b8FQJXXeFkZezQ@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=fakepaper56@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).