From patchwork Wed May 31 12:22:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 101404 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2838112vqr; Wed, 31 May 2023 05:25:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6tzmEWC+zrMkECPARYikIx2kW1h63dwZUb8Ro5j+2EFwgfx/onMg7muACC56/lxGvyfD52 X-Received: by 2002:a17:907:6d1d:b0:96a:1c2a:5a38 with SMTP id sa29-20020a1709076d1d00b0096a1c2a5a38mr5410798ejc.11.1685535901856; Wed, 31 May 2023 05:25:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685535901; cv=none; d=google.com; s=arc-20160816; b=hKyn+D+I63JsRjVi2pTpCsv2xOmgzMK0Kdz03gCtvqjG/2QrdPivLUiOkE8zNfsvXD XJpCIBbcws+ep6RHnSBxiTbUPCrvP479Nbb6fDpNQa0fAI3SeY3u8tKXDXNkqwCR3kC6 d07GvNUc9tBllYT1bw5Upt/t9KsC9bufsI6md9x7O4iDkd9NRk20kR9MCwoSpePP1Ueq Cv4p0BmeJBmzvDFhbG2/IqpR4LQMO3jFjaIlPhGCg6Fgs3MWEm6ZioOOiMm7sKtezLOu DWOAvqMirhWhr8vvqZ/SQ95dKncz/EgAjON4xgqHi1LZNtnK7cQXjBj0gNay/3O2nXxm i+CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=mri21PbZPUmtCes6k72EoUhRkeB3QYWj6ImbM6uu1aE=; b=AyLwbjTRcmLAVe2I3AKhzvh5/QwXPsAaMiMGLXVzGiMsRcwsCdrIQq2emTbykqxlb6 krdqPjp5BtAfaCqEzSVt1kqiUv45T25sv1Copm1qzp3hAwFtcl/EPerJIOaf1y9Vyeqs D2XLD9Up+1aS4GEEpyALlaD3MSpNy5umC1w7fN/HxAerAkFZDezkl1LNgX6NloaCMi3M VtCEz5+c6IjauyoZ9r435VtEywIRQuT1MEI3/fDLOGiJBQQazenBqeVfcSr4pd/ZZG/i KNztDTfuMulREUjr07ZqA+ingQB0jCUsJqy5KYAS3kJHlacWMmHF6xb5J+mp2bcdo9r3 u5dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=X7gL9RkC; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id kv23-20020a17090778d700b0096f76f35ae9si5904246ejc.754.2023.05.31.05.25.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 May 2023 05:25:01 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=X7gL9RkC; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1E7F9384FDFD for ; Wed, 31 May 2023 12:23:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1E7F9384FDFD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685535809; bh=mri21PbZPUmtCes6k72EoUhRkeB3QYWj6ImbM6uu1aE=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=X7gL9RkCXwqdjHaIu1QIU+tjHwoCkFp4+WFNLxZ66UY/QOWsU7JCqFP4z4KpAHEsy gx1btaNS6hfsX+CcwG8Su8WCAYnoNyhIUZFFdd8Kl7qeA4GeO6lAfU9qLA+f+uiygN QDFSmMKOXo4fXb5QfQLQ9LHQdKViXQdJ35UalONA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 E7CCE3858C1F for ; Wed, 31 May 2023 12:22:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E7CCE3858C1F Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-81-gbz0AzuLOnyR0OC2BOqSrQ-1; Wed, 31 May 2023 08:22:35 -0400 X-MC-Unique: gbz0AzuLOnyR0OC2BOqSrQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2B42185A5BE; Wed, 31 May 2023 12:22:35 +0000 (UTC) Received: from localhost (unknown [10.42.28.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id E9748112132C; Wed, 31 May 2023 12:22:34 +0000 (UTC) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Disable embedded tzdata for all 16-bit targets Date: Wed, 31 May 2023 13:22:34 +0100 Message-Id: <20230531122234.4116888-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.8 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767412494180607925?= X-GMAIL-MSGID: =?utf-8?q?1767412494180607925?= Tested powerpc64le-linux. Pushed to trunk. -- >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 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