From patchwork Wed May 31 20:02:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 70407 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1308A385734D for ; Wed, 31 May 2023 20:03:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1308A385734D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685563415; bh=2q74FeJX3tGyb94iU8RLqjmcpxpM4QC8juHtLqeZAMk=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=CbttFh1UCW5Sx66DSrBVNA79+q2ibrTC7/hxTIpHsrpxb1/jaM9Gk5tMddCWmqtoa lYf94qSbFIG4WscOjUAyIZ9n6JdgPINHSm93ljfRTSg1NBRKFEic0GMRciKVgMv6d0 IUamLlAhXNXFhwenHEX1VLlwG/SWpGMU/gw4+G6w= 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.133.124]) by sourceware.org (Postfix) with ESMTPS id 1ECB63858D20 for ; Wed, 31 May 2023 20:03:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1ECB63858D20 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-574-B_UdigsNMcOvNGSmVLHfmA-1; Wed, 31 May 2023 16:02:58 -0400 X-MC-Unique: B_UdigsNMcOvNGSmVLHfmA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0C2533C17C64; Wed, 31 May 2023 20:02:58 +0000 (UTC) Received: from localhost (unknown [10.42.28.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id C90EF421C3; Wed, 31 May 2023 20:02:57 +0000 (UTC) To: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: [committed] libstdc++: Fix configure test for 32-bit targets Date: Wed, 31 May 2023 21:02:57 +0100 Message-Id: <20230531200257.6784-1-jwakely@redhat.com> In-Reply-To: <20230531122222.4116868-1-jwakely@redhat.com> References: <20230531122222.4116868-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.2 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+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Tested x86_64-linux. Built msp430-elf and cris-elf. Pushed to trunk. -- >8 -- The -mlarge model for msp430-elf uses 20-bit pointers, which means that sizeof(void*) == 4 and so the r14-1432-g51cf0b3949b88b change gives the wrong answer. Check __INTPTR_WIDTH__ >= 32 instead. libstdc++-v3/ChangeLog: * acinclude.m4 (GLIBCXX_ZONEINFO_DIR): Fix for 32-bit pointers to check __INT_PTR_WIDTH__ instead of sizeof(void*). * configure: Regenerate. --- libstdc++-v3/acinclude.m4 | 2 +- libstdc++-v3/configure | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index eb30c4f00a5..ca776974832 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -5427,7 +5427,7 @@ AC_DEFUN([GLIBCXX_ZONEINFO_DIR], [ ;; esac - AC_COMPUTE_INT(glibcxx_cv_at_least_32bit, [sizeof(void*) >= 4]) + AC_COMPUTE_INT(glibcxx_cv_at_least_32bit, [__INTPTR_WIDTH__ >= 32]) 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 diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 4db8a284083..f573dfced2e 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -71904,7 +71904,7 @@ fi ;; esac - if ac_fn_c_compute_int "$LINENO" "sizeof(void*) >= 4" "glibcxx_cv_at_least_32bit" ""; then : + if ac_fn_c_compute_int "$LINENO" "__INTPTR_WIDTH__ >= 32" "glibcxx_cv_at_least_32bit" ""; then : fi