[gcc r14-1432] libstdc++: Disable embedded tzdata for all 16-bit targets
Jonathan Wakely
redi@gcc.gnu.org
Wed May 31 12:21:40 GMT 2023
https://gcc.gnu.org/g:51cf0b3949b88b5e622872e4dac019ceb27400e1
commit r14-1432-g51cf0b3949b88b5e622872e4dac019ceb27400e1
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue May 16 15:08:02 2023 +0100
libstdc++: Disable embedded tzdata for all 16-bit targets
libstdc++-v3/ChangeLog:
* acinclude.m4 (GLIBCXX_ZONEINFO_DIR): Extend logic for avr and
msp430 to all 16-bit targets.
* configure: Regenerate.
Diff:
---
libstdc++-v3/acinclude.m4 | 15 +++++++++------
libstdc++-v3/configure | 18 ++++++++++++------
2 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 8129373e9dd..eb30c4f00a5 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -5426,12 +5426,15 @@ AC_DEFUN([GLIBCXX_ZONEINFO_DIR], [
zoneinfo_dir=none
;;
esac
- case "$host" in
- avr-*-* | msp430-*-* ) embed_zoneinfo=no ;;
- *)
- # Also embed a copy of the tzdata.zi file as a static string.
- embed_zoneinfo=yes ;;
- esac
+
+ AC_COMPUTE_INT(glibcxx_cv_at_least_32bit, [sizeof(void*) >= 4])
+ if test "$glibcxx_cv_at_least_32bit" -ne 0; then
+ # Also embed a copy of the tzdata.zi file as a static string.
+ embed_zoneinfo=yes
+ else
+ # The embedded data is too large for 16-bit targets.
+ embed_zoneinfo=no
+ fi
elif test "x${with_libstdcxx_zoneinfo}" = xno; then
# Disable tzdb support completely.
zoneinfo_dir=none
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 412c4bf0e85..167aabd8fc5 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -71903,12 +71903,18 @@ fi
zoneinfo_dir=none
;;
esac
- case "$host" in
- avr-*-* | msp430-*-* ) embed_zoneinfo=no ;;
- *)
- # Also embed a copy of the tzdata.zi file as a static string.
- embed_zoneinfo=yes ;;
- esac
+
+ if ac_fn_c_compute_int "$LINENO" "sizeof(void*) >= 4" "glibcxx_cv_at_least_32bit" ""; then :
+
+fi
+
+ if test "$glibcxx_cv_at_least_32bit" -ne 0; then
+ # Also embed a copy of the tzdata.zi file as a static string.
+ embed_zoneinfo=yes
+ else
+ # The embedded data is too large for 16-bit targets.
+ embed_zoneinfo=no
+ fi
elif test "x${with_libstdcxx_zoneinfo}" = xno; then
# Disable tzdb support completely.
zoneinfo_dir=none
More information about the Libstdc++-cvs
mailing list