Re: G++ driver missing option when sending to collect2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 25 Feb 2021, 02:46 Yeting Kuo via Gcc-help, <gcc-help@xxxxxxxxxxx>
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.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux