From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 308E63858418; Thu, 29 Jun 2023 23:01:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 308E63858418 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688079690; bh=Tn7DVGSf/HvJJc0ie5CUyN37xnx0h1K6Bieq837fudg=; h=From:To:Subject:Date:From; b=ULpxB6QhYRuksrwe2egc9PInkYVqdw88Xl9N+qo+QANqEr7INbOGpF466LWZgIdiB 1B9soF/DO+O8bRuZ7xAF8YcvtRBgyA9ZntLYrj7YnJVkgnzt+pQbEGDDCQ4SEXHpXo g4aGxxpkWZsO/QyN03Nd0RuiywAfyz6zUGWFr0j0= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-7512] libstdc++: Disable embedded tzdata for all 16-bit targets X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/releases/gcc-13 X-Git-Oldrev: 2d40cd2f199e32f185d4b72db2043e91313ab7f2 X-Git-Newrev: fa78e9a672af8d36ba455f334824b2262a9517ae Message-Id: <20230629230130.308E63858418@sourceware.org> Date: Thu, 29 Jun 2023 23:01:30 +0000 (GMT) List-Id: https://gcc.gnu.org/g:fa78e9a672af8d36ba455f334824b2262a9517ae commit r13-7512-gfa78e9a672af8d36ba455f334824b2262a9517ae Author: Jonathan Wakely 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. (cherry picked from commit 51cf0b3949b88b5e622872e4dac019ceb27400e1) 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 af978e3f50c..6f2c4374048 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -5201,12 +5201,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 776c6b7ba58..95b8a8de649 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -71557,12 +71557,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