summaryrefslogtreecommitdiff
path: root/libstdc++-v3/acinclude.m4
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2020-08-13 16:33:28 +0100
committerJonathan Wakely <jwakely@redhat.com>2020-08-13 16:33:28 +0100
commit55484a0f816ef9ad7e13fb1057751223ed8471d8 (patch)
treed76f7a657472cb08359ac7a0a2251744c255241e /libstdc++-v3/acinclude.m4
parente00464a5cb4214f5a5de4535de4f684a86aa10d5 (diff)
downloadgcc-55484a0f816ef9ad7e13fb1057751223ed8471d8.tar.gz
libstdc++: Deprecate the --enable-cheaders=c_std configuration
These headers do not offer any tangible benefit compared to the default c_global version. They are not actively maintained meaning that they have bugs which have already been fixed for the c_global headers. This change adds a warning if they are used, and requires a new --enable-cheaders-obsolete option to allow their use. Unless we receive reports from users who rely on the c_std headers they should be removed at some point in future. libstdc++-v3/ChangeLog: * acinclude.m4 (GLIBCXX_ENABLE_CHEADERS): Warn if the c_std option is used and fail unless --enable-cheaders-obsolete is also used. * configure: Regenerate.
Diffstat (limited to 'libstdc++-v3/acinclude.m4')
-rw-r--r--libstdc++-v3/acinclude.m416
1 files changed, 14 insertions, 2 deletions
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 26cf2197549..133125ec4fa 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -2377,12 +2377,24 @@ dnl
dnl --enable-cheaders= [does stuff].
dnl --disable-cheaders [does not do anything, really].
dnl + Usage: GLIBCXX_ENABLE_CHEADERS[(DEFAULT)]
-dnl Where DEFAULT is either 'c' or 'c_std' or 'c_global'.
+dnl Where DEFAULT is either 'c' or 'c_global' or 'c_std'.
+dnl
+dnl To use the obsolete 'c_std' headers use --enable-cheaders-obsolete as
+dnl well as --enable-cheaders=c_std, otherwise configure will fail.
dnl
AC_DEFUN([GLIBCXX_ENABLE_CHEADERS], [
+ GLIBCXX_ENABLE(cheaders-obsolete,no,,
+ [allow use of obsolete "C" headers for g++])
GLIBCXX_ENABLE(cheaders,$1,[[[=KIND]]],
- [construct "C" headers for g++], [permit c|c_std|c_global])
+ [construct "C" headers for g++], [permit c|c_global|c_std])
AC_MSG_NOTICE("C" header strategy set to $enable_cheaders)
+ if test $enable_cheaders = c_std ; then
+ AC_MSG_WARN([the --enable-cheaders=c_std configuration is obsolete, c_global should be used instead])
+ AC_MSG_WARN([if you are unable to use c_global please report a bug or inform libstdc++@gcc.gnu.org])
+ if test $enable_cheaders_obsolete != yes ; then
+ AC_MSG_ERROR(use --enable-cheaders-obsolete to use c_std "C" headers)
+ fi
+ fi
C_INCLUDE_DIR='${glibcxx_srcdir}/include/'$enable_cheaders