public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Arsen Arsenović" <arsen@aarsen.me>
To: gcc-patches@gcc.gnu.org
Cc: libstdc++@gcc.gnu.org, "Arsen Arsenović" <arsen@aarsen.me>
Subject: [PATCH] libstdc++: respect with-{headers,newlib} for default hosted value
Date: Wed, 12 Oct 2022 21:47:35 +0200	[thread overview]
Message-ID: <20221012194734.85319-1-arsen@aarsen.me> (raw)

This saves us a build flag when building for freestanding targets.

libstdc++-v3/ChangeLog:

	* acinclude.m4: Default hosted to off if building without
	headers and without newlib.
---
Tested for x86_64-elf.

 libstdc++-v3/acinclude.m4 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 719eab15c77..8f4e901c909 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -2982,7 +2982,10 @@ AC_DEFUN([GLIBCXX_ENABLE_HOSTED], [
 	    enable_hosted_libstdcxx=no
 	    ;;
 	*)
-	    enable_hosted_libstdcxx=yes
+	    case "${with_newlib}-${with_headers}" in
+	    no-no) enable_hosted_libstdcxx=no ;;
+	    *) enable_hosted_libstdcxx=yes ;;
+	    esac
 	    ;;
      esac])
 
-- 
2.38.0


             reply	other threads:[~2022-10-12 19:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12 19:47 Arsen Arsenović [this message]
2022-10-21  9:51 ` [PATCH] libstdc++: respect with-{headers, newlib} " Jonathan Wakely

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=20221012194734.85319-1-arsen@aarsen.me \
    --to=arsen@aarsen.me \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.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).