]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Remove unwanted STDC_HEADERS macro from c++config.h [PR79147]
authorJonathan Wakely <jwakely@redhat.com>
Fri, 19 Sep 2025 11:11:26 +0000 (12:11 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 25 Sep 2025 13:51:50 +0000 (14:51 +0100)
Similar to r16-4034-g1953939243e1ab, this comments out another macro
that Autoconf adds to the generated config.h but which is not wanted in
the c++config.h file that we install.

There's no benefit to defining _GLIBCXX_STDC_HEADERS in user code, so we
should just prevent it from being defined.

libstdc++-v3/ChangeLog:

PR libstdc++/79147
PR libstdc++/103650
* include/Makefile.am (c++config.h): Adjust sed command to
comment out STDC_HEADERS macro.
* include/Makefile.in: Regenerate.

libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in

index d1e5c3d84918df5be2b9ea89b55dd472774c24f1..ae7a7ca9073ad2b5acae36f4096a8fbf1fa8d39a 100644 (file)
@@ -1424,7 +1424,7 @@ ${host_builddir}/c++config.h: ${CONFIG_HEADER} \
            -e '/PACKAGE/!s/VERSION/_GLIBCXX_VERSION/g' \
            -e 's/WORDS_/_GLIBCXX_WORDS_/g' \
            -e 's/LT_OBJDIR/_GLIBCXX_LT_OBJDIR/g' \
-           -e 's/STDC_HEADERS/_GLIBCXX_STDC_HEADERS/g' \
+           -e 's,^#.*STDC_HEADERS,// &,' \
            -e 's/_DARWIN_USE_64_BIT_INODE/_GLIBCXX_DARWIN_USE_64_BIT_INODE/g' \
            -e 's/_FILE_OFFSET_BITS/_GLIBCXX_FILE_OFFSET_BITS/g' \
            -e 's/_LARGE_FILES/_GLIBCXX_LARGE_FILES/g' \
index 13c0b5b4f8393bb4e8904f836cd785b4a0e8e2ec..133984784cd5bb6ed44e2b7e53322d1024a72583 100644 (file)
@@ -1901,7 +1901,7 @@ ${host_builddir}/c++config.h: ${CONFIG_HEADER} \
            -e '/PACKAGE/!s/VERSION/_GLIBCXX_VERSION/g' \
            -e 's/WORDS_/_GLIBCXX_WORDS_/g' \
            -e 's/LT_OBJDIR/_GLIBCXX_LT_OBJDIR/g' \
-           -e 's/STDC_HEADERS/_GLIBCXX_STDC_HEADERS/g' \
+           -e 's,^#.*STDC_HEADERS,// &,' \
            -e 's/_DARWIN_USE_64_BIT_INODE/_GLIBCXX_DARWIN_USE_64_BIT_INODE/g' \
            -e 's/_FILE_OFFSET_BITS/_GLIBCXX_FILE_OFFSET_BITS/g' \
            -e 's/_LARGE_FILES/_GLIBCXX_LARGE_FILES/g' \