public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Alexandre Oliva <oliva@adacore.com>,
	Iain Sandoe <idsandoe@googlemail.com>
Cc: Joseph Myers <joseph@codesourcery.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	Nathan Sidwell <nathan@acm.org>
Subject: Re: [PATCH] Introduce -nolibstdc++ option
Date: Fri, 16 Sep 2022 13:52:58 +0200	[thread overview]
Message-ID: <82f812d9-5d3c-ab08-528c-61f64e7fc4e1@redhat.com> (raw)
In-Reply-To: <oredze1vot.fsf@lxoliva.fsfla.org>

[-- Attachment #1: Type: text/plain, Size: 977 bytes --]

On 6/24/22 01:23, Alexandre Oliva via Gcc-patches wrote:
> On Jun 23, 2022, Alexandre Oliva <oliva@adacore.com> wrote:
> 
>> Here's the patch.  Regstrapped on x86_64-linux-gnu, also tested with a
>> cross to aarch64-rtems6.  Ok to install?
> 
>> Introduce -nostdlib++ option
> 
> Uhh, I went ahead and installed this.  The earlier patch was approved if
> nobody objected, and so, having overcome the objection to the option
> spelling, it ended up in my "approved" patchset.
> 
> In case there are objections to it, please let me know, and I'll revert
> it promptly, but I guess it makes little sense to revert it on the odd
> change that someone does.  Thanks for your understanding.

I'm getting failures from pure-virtual1.C with

xg++: error: unrecognized command-line option '-nostdlib++'

I guess that's because it isn't handled by the specs in the way nostdlib 
and nodefautlibs are.  Maybe the solution is to set SKIPOPT in the driver?

Are you not seeing this problem?

[-- Attachment #2: 0001-c-fix-nostdlib.patch --]
[-- Type: text/x-patch, Size: 834 bytes --]

From e648ff579bb4b4a690553d4c6f4a3a1b7ff7a287 Mon Sep 17 00:00:00 2001
From: Jason Merrill <jason@redhat.com>
Date: Fri, 16 Sep 2022 13:51:49 +0200
Subject: [PATCH] c++: fix -nostdlib++
To: gcc-patches@gcc.gnu.org

gcc/cp/ChangeLog:

	* g++spec.cc (lang_specific_driver): Set SKIPOPT on -nostdlib++.
---
 gcc/cp/g++spec.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/cp/g++spec.cc b/gcc/cp/g++spec.cc
index b63d8350ba1..31345f7869e 100644
--- a/gcc/cp/g++spec.cc
+++ b/gcc/cp/g++spec.cc
@@ -158,8 +158,10 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
 
       switch (decoded_options[i].opt_index)
 	{
-	case OPT_nostdlib:
 	case OPT_nostdlib__:
+	  args[i] |= SKIPOPT;
+	  /* FALLTHRU */
+	case OPT_nostdlib:
 	case OPT_nodefaultlibs:
 	  library = -1;
 	  break;
-- 
2.31.1


  reply	other threads:[~2022-09-16 11:53 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 [this message]
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
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=82f812d9-5d3c-ab08-528c-61f64e7fc4e1@redhat.com \
    --to=jason@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=idsandoe@googlemail.com \
    --cc=joseph@codesourcery.com \
    --cc=nathan@acm.org \
    --cc=oliva@adacore.com \
    /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).