> On 22 Jun 2022, at 01:36, Alexandre Oliva via Gcc-patches 
> <gcc-patches@gcc.gnu.org> wrote:
> 
> On Jun 21, 2022, Fangrui Song <mask...@google.com> wrote:
> 
>> Is this similar to clang -nostdlib++ ?
>> When libstdc++ is selected, clang -nostdlib++ removes -lstdc++.
> 
> Sounds like they're the same indeed, but the clang option you mention
> makes little sense to me, so I'd rather to introduce the one that does.
> If someone feels offering this option with the same spelling as clang,
> it's easy enough to add a synonym.  Now, if others feel we'd be better
> off following clang's practices, I don't mind adjusting the patch to use
> the same spelling.  It's not like this option is going to have much use
> one way or another, aside from this testcase.

we have nostdlib, nodefaultlibs (which also omit the C++ libs)

It makes some sense to have the option named -nostdlib++ if a target
might add multiple libs (and/or make other changes) for linking C++.

(so, fo example, if libstdc++ were separate from libsupc++ I would
 expect your use-case to wish to exclude both, not just libstdc++)?

From the PoV of users and build systems, it’s also helpful to avoid
proliferating option names unless there’s some clear distinction in function
between compilers - if GCC already has an option spelling, usually
clang would follow that - it does not seem unreasonable to reciprocate.

0.02GBP only, of course,
Iain

> 
> -- 
> Alexandre Oliva, happy hacker                https://FSFLA.org/blogs/lxo/
>   Free Software Activist                       GNU Toolchain Engineer
> Disinformation flourishes because many people care deeply about injustice
> but very few check the facts.  Ask me about <https://stallmansupport.org>

Reply via email to