On Mon, 13 Oct 2025 at 20:06, Joel Sherrill <[email protected]> wrote: > > RTEMS has carried this patch for too long and it was posted to gcc-patches > last month. > > Any commits rom libstdc++ folks or is it OK to commit? > > Thanks. > > --joel > > On Wed, Oct 1, 2025 at 3:44 PM Joel Sherrill <[email protected]> wrote: >> >> From: Chris Johns <[email protected]> >> >> libstdc++-v3/ChangeLog: >> >> * configure: Regenerate.
How was this regenerated? Because I see errors on trunk and gcc-15: autoheader_: warning: missing template: HAVE_SYS_IOCT4YL_H autoheader_: Use AC_DEFINE([HAVE_SYS_IOCT4YL_H], [], [Description]) autoheader_: warning: missing template: _GLIBCXX_USE_FDOPENDIR autoheader_: warning: missing template: _GLIBCXX_USE_LINK autoheader_: warning: missing template: _GLIBCXX_USE_READLINK autoheader_: warning: missing template: _GLIBCXX_USE_SYMLINK autoheader_: warning: missing template: _GLIBCXX_USE_TRUNCATE autoreconf_: /opt/autotools-gcc/bin/autoheader_ failed with exit status: 1 See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122322 >> * configure.ac (newlib, *-rtems*): Add HAVE_SYS_IOCTL_H, >> HAVE_SYS_STAT_H, HAVE_SYS_TYPES_H, HAVE_S_ISREG, HAVE_UNISTD_H, >> HAVE_UNLINKAT, _GLIBCXX_USE_CHMOD, _GLIBCXX_USE_MKDIR, >> _GLIBCXX_USE_CHDIR, _GLIBCXX_USE_GETCWD, _GLIBCXX_USE_UTIME, >> _GLIBCXX_USE_LINK, _GLIBCXX_USE_READLINK, _GLIBCXX_USE_SYMLINK, >> _GLIBCXX_USE_TRUNCATE and _GLIBCXX_USE_FDOPENDIR. Looking more closely, several of these are never needed by libstdc++, so I'm not sure why they are being added here. And four of them were added twice. I think the attached patch is needed (on trunk and gcc-15 and gcc14).
commit 8ac35b4e7ff15283d47f6cea5f664ab90719f35c Author: Jonathan Wakely <[email protected]> AuthorDate: Sat Oct 18 22:05:43 2025 Commit: Jonathan Wakely <[email protected]> CommitDate: Sat Oct 18 22:05:43 2025 libstdc++: Remove undeclared macros from configure.ac [PR122322] The additions inr16-4443-g651bf5126da124 cause errors when running autoreconf. libstdc++-v3/ChangeLog: PR libstdc++/122322 * configure.ac (with_newlib) <*-rtems*>: Remove HAVE_SYS_IOCT4YL_H, _GLIBCXX_USE_LINK, _GLIBCXX_USE_READLINK, _GLIBCXX_USE_SYMLINK, _GLIBCXX_USE_TRUNCATE, and _GLIBCXX_USE_FDOPENDIR. Remove duplicates. * configure: Regenerate. diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 42b638f09fcb..5302780be00a 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -28744,14 +28744,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext $as_echo "#define HAVE_LINK 1" >>confdefs.h - $as_echo "#define HAVE_SYS_IOCT4YL_H 1" >>confdefs.h - $as_echo "#define HAVE_SYS_STAT_H 1" >>confdefs.h $as_echo "#define HAVE_SYS_TYPES_H 1" >>confdefs.h - $as_echo "#define HAVE_S_ISREG 1" >>confdefs.h - $as_echo "#define HAVE_QUICK_EXIT 1" >>confdefs.h $as_echo "#define HAVE_READLINK 1" >>confdefs.h @@ -28766,12 +28762,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h - $as_echo "#define HAVE_SYS_IOCT4YL_H 1" >>confdefs.h - - $as_echo "#define HAVE_SYS_STAT_H 1" >>confdefs.h - - $as_echo "#define HAVE_SYS_TYPES_H 1" >>confdefs.h - $as_echo "#define HAVE_S_ISREG 1" >>confdefs.h $as_echo "#define HAVE_TRUNCATE 1" >>confdefs.h @@ -28792,16 +28782,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext $as_echo "#define _GLIBCXX_USE_UTIME 1" >>confdefs.h - $as_echo "#define _GLIBCXX_USE_LINK 1" >>confdefs.h - - $as_echo "#define _GLIBCXX_USE_READLINK 1" >>confdefs.h - - $as_echo "#define _GLIBCXX_USE_SYMLINK 1" >>confdefs.h - - $as_echo "#define _GLIBCXX_USE_TRUNCATE 1" >>confdefs.h - - $as_echo "#define _GLIBCXX_USE_FDOPENDIR 1" >>confdefs.h - $as_echo "#define HAVE_USLEEP 1" >>confdefs.h @@ -53961,7 +53941,7 @@ $as_echo "$glibcxx_cv_libbacktrace_atomics" >&6; } CXXFLAGS='-O0 -S' cat > conftest.$ac_ext << EOF -#line 53964 "configure" +#line 53944 "configure" #include <stddef.h> int main() { diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac index b9d49c3e4364..339e7bb17a4d 100644 --- a/libstdc++-v3/configure.ac +++ b/libstdc++-v3/configure.ac @@ -399,10 +399,8 @@ dnl # rather than hardcoding that information. AC_DEFINE(HAVE_ALIGNED_ALLOC) AC_DEFINE(HAVE_AT_QUICK_EXIT) AC_DEFINE(HAVE_LINK) - AC_DEFINE(HAVE_SYS_IOCT4YL_H) AC_DEFINE(HAVE_SYS_STAT_H) AC_DEFINE(HAVE_SYS_TYPES_H) - AC_DEFINE(HAVE_S_ISREG) AC_DEFINE(HAVE_QUICK_EXIT) AC_DEFINE(HAVE_READLINK) AC_DEFINE(HAVE_SETENV) @@ -410,9 +408,6 @@ dnl # rather than hardcoding that information. AC_DEFINE(HAVE_SOCKATMARK) AC_DEFINE(HAVE_STRERROR_L) AC_DEFINE(HAVE_SYMLINK) - AC_DEFINE(HAVE_SYS_IOCT4YL_H) - AC_DEFINE(HAVE_SYS_STAT_H) - AC_DEFINE(HAVE_SYS_TYPES_H) AC_DEFINE(HAVE_S_ISREG) AC_DEFINE(HAVE_TRUNCATE) AC_DEFINE(HAVE_UNISTD_H) @@ -423,11 +418,6 @@ dnl # rather than hardcoding that information. AC_DEFINE(_GLIBCXX_USE_CHDIR) AC_DEFINE(_GLIBCXX_USE_GETCWD) AC_DEFINE(_GLIBCXX_USE_UTIME) - AC_DEFINE(_GLIBCXX_USE_LINK) - AC_DEFINE(_GLIBCXX_USE_READLINK) - AC_DEFINE(_GLIBCXX_USE_SYMLINK) - AC_DEFINE(_GLIBCXX_USE_TRUNCATE) - AC_DEFINE(_GLIBCXX_USE_FDOPENDIR) AC_DEFINE(HAVE_USLEEP) # These functions are defined in librtemscpu. We don't use
