From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path:
Received: from rock.gnat.com (rock.gnat.com [IPv6:2620:20:4000:0:a9e:1ff:fe9b:1d1])
by sourceware.org (Postfix) with ESMTPS id 669D5385843A
for ; Thu, 30 Mar 2023 11:24:03 +0000 (GMT)
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 669D5385843A
Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com
Received: from localhost (localhost.localdomain [127.0.0.1])
by filtered-rock.gnat.com (Postfix) with ESMTP id E2252116470;
Thu, 30 Mar 2023 07:24:02 -0400 (EDT)
X-Virus-Scanned: Debian amavisd-new at gnat.com
Received: from rock.gnat.com ([127.0.0.1])
by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024)
with LMTP id UHunS-1uULTn; Thu, 30 Mar 2023 07:24:02 -0400 (EDT)
Received: from free.home (tron.gnat.com [IPv6:2620:20:4000:0:46a8:42ff:fe0e:e294])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by rock.gnat.com (Postfix) with ESMTPS id 2E14A1162F9;
Thu, 30 Mar 2023 07:24:01 -0400 (EDT)
Received: from livre (livre.home [172.31.160.2])
by free.home (8.15.2/8.15.2) with ESMTPS id 32UBNpGi1544290
(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);
Thu, 30 Mar 2023 08:23:52 -0300
From: Alexandre Oliva
To: Gerald Pfeifer
Cc: Iain Sandoe ,
Joseph Myers ,
GCC Patches , Nathan Sidwell
Subject: Re: [PATCH] Introduce -nolibstdc++ option
Organization: Free thinker, does not speak for AdaCore
References:
Errors-To: aoliva@lxoliva.fsfla.org
Date: Thu, 30 Mar 2023 08:23:51 -0300
In-Reply-To: (Gerald
Pfeifer's message of "Sat, 11 Feb 2023 10:09:57 +0100 (CET)")
Message-ID:
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Scanned-By: MIMEDefang 2.84
X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_STATUS,KAM_SHORT,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org
List-Id:
Hello, Gerald,
On Feb 11, 2023, Gerald Pfeifer 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.
The -Wpessimizing-move
and -Wredundant-move
warnings have been extended to warn in more contexts.
+ The -nostdlib++
+ option has been added, to enable linking with g++
+ without implicitly linking in the C++ standard library.
Runtime Library (libstdc++)
--
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