public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libstdc++: respect with-{headers,newlib} for default hosted value
@ 2022-10-12 19:47 Arsen Arsenović
  2022-10-21  9:51 ` [PATCH] libstdc++: respect with-{headers, newlib} " Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: Arsen Arsenović @ 2022-10-12 19:47 UTC (permalink / raw)
  To: gcc-patches; +Cc: libstdc++, Arsen Arsenović

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] libstdc++: respect with-{headers, newlib} for default hosted value
  2022-10-12 19:47 [PATCH] libstdc++: respect with-{headers,newlib} for default hosted value Arsen Arsenović
@ 2022-10-21  9:51 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2022-10-21  9:51 UTC (permalink / raw)
  To: Arsen Arsenović; +Cc: gcc-patches, libstdc++

Pushed to trunk, thanks.

On Wed, 12 Oct 2022 at 20:48, Arsen Arsenović via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
> 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
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-21  9:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-12 19:47 [PATCH] libstdc++: respect with-{headers,newlib} for default hosted value Arsen Arsenović
2022-10-21  9:51 ` [PATCH] libstdc++: respect with-{headers, newlib} " Jonathan Wakely

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).