public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r13-3436] libstdc++: respect with-{headers, newlib} for default hosted value
Date: Fri, 21 Oct 2022 09:51:41 +0000 (GMT)	[thread overview]
Message-ID: <20221021095141.7EF41385140A@sourceware.org> (raw)

https://gcc.gnu.org/g:88b34661f73e9da8032d20a37299223b39db4ef9

commit r13-3436-g88b34661f73e9da8032d20a37299223b39db4ef9
Author: Arsen Arsenović <arsen@aarsen.me>
Date:   Wed Oct 12 21:47:35 2022 +0200

    libstdc++: respect with-{headers, newlib} for default hosted value
    
    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.
            * configure: Regenerate.

Diff:
---
 libstdc++-v3/acinclude.m4 |  5 ++++-
 libstdc++-v3/configure    | 17 ++++++++++-------
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 6523ba9a816..6f672924a73 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])
 
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index a90097523ab..9159ffb766b 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -15698,7 +15698,10 @@ else
 	    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
 fi
@@ -16063,7 +16066,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
   # Fake what AC_TRY_COMPILE does.
 
     cat > conftest.$ac_ext << EOF
-#line 16066 "configure"
+#line 16069 "configure"
 int main()
 {
   typedef bool atomic_type;
@@ -16098,7 +16101,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 16101 "configure"
+#line 16104 "configure"
 int main()
 {
   typedef short atomic_type;
@@ -16133,7 +16136,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 16136 "configure"
+#line 16139 "configure"
 int main()
 {
   // NB: _Atomic_word not necessarily int.
@@ -16169,7 +16172,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 16172 "configure"
+#line 16175 "configure"
 int main()
 {
   typedef long long atomic_type;
@@ -16325,7 +16328,7 @@ $as_echo "mutex" >&6; }
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 16328 "configure"
+#line 16331 "configure"
 int main()
 {
   _Decimal32 d1;
@@ -16367,7 +16370,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
   # unnecessary for this test.
 
   cat > conftest.$ac_ext << EOF
-#line 16370 "configure"
+#line 16373 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };

                 reply	other threads:[~2022-10-21  9:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20221021095141.7EF41385140A@sourceware.org \
    --to=redi@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@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).