From: Alexandre Oliva <oliva@adacore.com>
To: Gerald Pfeifer <gerald@pfeifer.com>
Cc: Iain Sandoe <idsandoe@googlemail.com>,
Joseph Myers <joseph@codesourcery.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Nathan Sidwell <nathan@acm.org>
Subject: Re: [PATCH] Introduce -nolibstdc++ option
Date: Thu, 30 Mar 2023 08:23:51 -0300 [thread overview]
Message-ID: <ora5zumqig.fsf@lxoliva.fsfla.org> (raw)
In-Reply-To: <adcea303-5376-d5da-85f1-4b5cea1013a6@pfeifer.com> (Gerald Pfeifer's message of "Sat, 11 Feb 2023 10:09:57 +0100 (CET)")
Hello, Gerald,
On Feb 11, 2023, Gerald Pfeifer <gerald@pfeifer.com> wrote:
> On Thu, 23 Jun 2022, Alexandre Oliva via Gcc-patches wrote:
>> Introduce -nostdlib++ option
>>
>> Using g++ to link without libstdc++, as in g++.dg/abi/pure-virtual1.C,
>> is error prone, because there's no way to tell g++ to drop libstdc++
>> without also dropping libc and any other libraries that the target
>> implicitly links in.
> % grep -r nostdlib $WWWDOCS
> %
> Should this be documented in gcc-13/changes.html? Would you mind proposing
> a snippet (or going ahead and pushing it)?
I can't make my mind up about this.
At first, the goal of adding the option was just to aid this specific
test. But then, it transpired that other compilers offered a similar
option, with the spelling that we ended up using, so perhaps it would
make sense to document it, after all.
How about this, does this seem useful?
diff --git a/htdocs/gcc-13/changes.html b/htdocs/gcc-13/changes.html
index ff70d2eefecec..c1bbbfa28e18e 100644
--- a/htdocs/gcc-13/changes.html
+++ b/htdocs/gcc-13/changes.html
@@ -333,6 +333,9 @@ a work-in-progress.</p>
<li>The <a href="https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Dialect-Options.html#index-Wpessimizing-move"><code>-Wpessimizing-move</code></a>
and <a href="https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Dialect-Options.html#index-Wredundant-move"><code>-Wredundant-move</code></a>
warnings have been extended to warn in more contexts.</li>
+ <li>The <a href="https://gcc.gnu.org/onlinedocs/gcc/Link_Options.html#index-nostdlib_002b_002b"><code>-nostdlib++</code></a>
+ option has been added, to enable linking with <code>g++</code>
+ without implicitly linking in the C++ standard library.</li>
</ul>
<h4 id="libstdcxx">Runtime Library (libstdc++)</h4>
--
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>
next prev parent reply other threads:[~2023-03-30 11:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 5:55 Alexandre Oliva
2022-06-21 7:37 ` Richard Biener
2022-06-21 7:53 ` Fangrui Song
2022-06-21 8:03 ` Richard Biener
2022-06-21 8:19 ` Fangrui Song
2022-06-22 0:36 ` Alexandre Oliva
2022-06-22 18:39 ` Iain Sandoe
2022-06-22 23:28 ` Alexandre Oliva
2022-06-22 23:42 ` Fangrui Song
2022-06-23 11:27 ` Alexandre Oliva
2022-06-24 5:23 ` Alexandre Oliva
2022-09-16 11:52 ` Jason Merrill
2022-09-16 11:53 ` Jason Merrill
2022-11-28 17:56 ` Jason Merrill
2023-02-11 9:09 ` Gerald Pfeifer
2023-03-30 11:23 ` Alexandre Oliva [this message]
2023-03-30 13:38 ` Arsen Arsenović
2023-03-30 23:13 ` Gerald Pfeifer
2023-04-06 1:25 ` Alexandre Oliva
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=ora5zumqig.fsf@lxoliva.fsfla.org \
--to=oliva@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gerald@pfeifer.com \
--cc=idsandoe@googlemail.com \
--cc=joseph@codesourcery.com \
--cc=nathan@acm.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).