From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 618F93858C83 for ; Tue, 16 May 2023 17:30:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 618F93858C83 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684258240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QBw2kL4M31844waro5FvtIdXovkakxezTlNpsh7YNsk=; b=dlmx1pQvBjDHgICyOp7yJJ4ClG25opqA2K2K6F2CNAd8FuwSq16VXNYHNnDLyXRrfEQwen fCdKC2JL0YWcFEHdrVpHwzTsKPk5SHH+h8IBxQpAdsHQ3LABaNiwgp47eiojrmfL31fIQc dnB9O6vL1tUZSw/tgohwlYvyhYpcBGg= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-17-YtPKIjh1PBKPXpPU3yk4Qg-1; Tue, 16 May 2023 13:30:38 -0400 X-MC-Unique: YtPKIjh1PBKPXpPU3yk4Qg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3B9801C05149; Tue, 16 May 2023 17:30:38 +0000 (UTC) Received: from localhost (unknown [10.42.28.178]) by smtp.corp.redhat.com (Postfix) with ESMTP id EDABD40B947; Tue, 16 May 2023 17:30:37 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Cc: Roger Sayle Subject: [PATCH] libstdc++: Disable embedded tzdata for all 16-bit targets Date: Tue, 16 May 2023 18:30:37 +0100 Message-Id: <20230516173037.1807702-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Tested powerpc64le-linux. Builds OK for avr too. Roger, does this work for xstormy16? -- >8 -- 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 | 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 188be08d716..345ba5721a8 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 -- 2.40.1