On 10/28/2021 10:39 AM, Richard Purdie wrote:
On Thu, 2021-10-28 at 08:51 -0600, Jeff Law wrote:
On 10/27/2021 2:05 PM, Richard Purdie via Gcc-patches wrote:
OpenEmbedded/Yocto Project builds libgcc and the other gcc runtime libraries
separately from the compiler and slightly differently to the standard gcc build.
In general this works well but in trying to build them separately we run into
an issue since we're using our gcc, not xgcc and there is no way to tell
configure
to use libgcc but not look for libstdc++.
This adds such an option allowing such configurations to work.
2021-10-26 Richard Purdie <richard.pur...@linuxfoundation.org>
gcc/c-family/ChangeLog:
* c.opt: Add --nostdlib++ option
gcc/cp/ChangeLog:
* g++spec.c (lang_specific_driver): Add --nostdlib++ option
gcc/ChangeLog:
* doc/invoke.texi: Document --nostdlib++ option
* gcc.c: Add --nostdlib++ option
Couldn't you use -nostdlib then explicitly add -lgcc?
If that works, that would seem better to me compared to adding an option
to specs processing that is really only useful to one build
system/procedure.
It sounds great in principle but I've never been able to get it to work. With
"-nostdinc++ -nostdlib" I miss the startup files so I also tried "-nostdinc++ -
nodefaultlibs -lgcc". The latter gets further and I can build libstdc++ but the
resulting library doesn't link into applications correctly.
Can you be more specific about "doesn't link into applications
correctly". I'm still hesitant to add another option if we can
reasonably avoid it.
jeff