]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Disable embedded tzdata for all 16-bit targets
authorJonathan Wakely <jwakely@redhat.com>
Tue, 16 May 2023 14:08:02 +0000 (15:08 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 31 May 2023 12:17:45 +0000 (13:17 +0100)
libstdc++-v3/ChangeLog:

* acinclude.m4 (GLIBCXX_ZONEINFO_DIR): Extend logic for avr and
msp430 to all 16-bit targets.
* configure: Regenerate.

libstdc++-v3/acinclude.m4
libstdc++-v3/configure

index 8129373e9dd7a1189895504ff379452de7873c1a..eb30c4f00a5c086145551ac1b334dde86fa564c0 100644 (file)
@@ -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
index 412c4bf0e857e680feeada1fcfff5255b67b259a..167aabd8fc59079189c6b43bdbcda924cac185da 100755 (executable)
        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