public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: Keith Packard <keithp@keithp.com>
Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 1/2] libstdc++: Add --enable-pure-stdio-libstdcxx option
Date: Mon, 7 Dec 2020 18:55:01 +0000	[thread overview]
Message-ID: <20201207185501.GA4100714@redhat.com> (raw)
In-Reply-To: <20201207183927.3275768-2-keithp@keithp.com>

On 07/12/20 10:39 -0800, Keith Packard via Libstdc++ wrote:
>This option directs the library to only use simple stdio APIs instead
>of using fileno to get the file descriptor for use with POSIX APIs.

Makes sense, thanks.

I've replaced the gcc@ list with gcc-patches@ in the recipients.

>Signed-off-by: Keith Packard <keithp@keithp.com>
>---
> libstdc++-v3/ChangeLog                     | 13 ++++++
> libstdc++-v3/acinclude.m4                  | 13 ++++++
> libstdc++-v3/config/io/basic_file_stdio.cc | 46 +++++++++++++++++++---
> libstdc++-v3/configure.ac                  |  1 +
> 4 files changed, 68 insertions(+), 5 deletions(-)
>
>diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
>index d3ee18ed7d1..7f6b0697534 100644
>--- a/libstdc++-v3/ChangeLog
>+++ b/libstdc++-v3/ChangeLog
>@@ -1147,6 +1147,19 @@
> 	* include/bits/uniform_int_dist.h (uniform_int_distribution::_S_nd):
> 	Use qualified-id to refer to static member functions.
>
>+2020-11-04  Keith Packard  <keithp@keithp.com>
>+
>+	* acinclude.m4: Add GLIBCXX_ENABLE_PURE_STDIO for
>+	--enable-libstdcxx-pure-stdio
>+	* configure.ac: Use GLIBCXX_ENABLE_PURE_STDIO for
>+	--enable-libstdcxx-pure-stdio
>+	* configure: regenerate
>+	* config.h.in: regenerate
>+	* config/io/basic_file_stdio.cc: Add support for
>+	_GLIBCXX_USE_PURE_STDIO. This makes libstdc++ use only defined
>+	stdio entry points for all I/O operations, without direct calls to
>+	underlying POSIX functions.
>+
> 2020-11-03  Jonathan Wakely  <jwakely@redhat.com>

GCC changelog files are autogenerated now, so patches should not touch
them. Just include the ChangeLog entry in the Git commit log (which
will usually end up being quoted in the patch and/or the email body of
the mail to gcc-patches).

I think the right way to do this (or at least, the way that was
intended when basic_file_stdio.cc was added) is to provide a new file
and change GLIBCXX_ENABLE_CSTDIO in acinclude.m4 to use that new file.

The two biggest downsides of that are that it duplicates a lot of the
file (because the diffs for your changes are small) and that the
correct name for your new file is already taken!

I think we should rename basic_file_stdio.{h,cc} to basic_file_posix
to vacate the basic_file_stdio name for what you want.

However, it's rather late in the GCC 11 process to make a change like
that (even though it's really just renaming some files). Would you be
OK waiting until after GCC 11 is released (in 4-5 months) to do it
"properly"? Is this blocking something that would require doing it
sooner?



       reply	other threads:[~2020-12-07 18:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20201207183927.3275768-1-keithp@keithp.com>
     [not found] ` <20201207183927.3275768-2-keithp@keithp.com>
2020-12-07 18:55   ` Jonathan Wakely [this message]
2020-12-07 20:36     ` Keith Packard
2020-12-09 10:17       ` Jonathan Wakely
2020-12-09 16:32         ` Keith Packard
2020-12-09 16:52           ` Jonathan Wakely
2020-12-10  2:46         ` [PATCH 0/2] Support libc with stdio-only I/O in libstdc++ Keith Packard
2020-12-10  2:46           ` [PATCH 1/2] libstdc++: Add --enable-stdio=stdio_pure option [v2] Keith Packard
2020-12-10 20:23             ` Jonathan Wakely
2020-12-10 20:56               ` Keith Packard
2020-12-15 18:43                 ` Jonathan Wakely
2020-12-10  2:46           ` [PATCH 2/2] Regenerate libstdc++-v3 autoconf files Keith Packard

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=20201207185501.GA4100714@redhat.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=keithp@keithp.com \
    --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).