From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 4D9D1385697D; Thu, 29 Jun 2023 23:01:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4D9D1385697D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688079695; bh=AkAHN1/IjOlEiwKtkQqPy9XQB56hVskH5/bl0nmyHrQ=; h=From:To:Subject:Date:From; b=Dm7wGVmUEc/omiYG2Mx6aX9WuBcyts4sPlUQhim8iEv6S0sOiQ7NLqT0aDonKIoJk uloqFWkExCCKEJpNMl1kpK+xN2otFJVXnTJPB/N7ZcTJZDGse6M3NFlCpi/u2YR5ML v0oDXzHb/D8ugWfVWyaHE0C1ElriG4Ocqpxdtw5A= 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-7513] libstdc++: Fix configure test for 32-bit targets X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/releases/gcc-13 X-Git-Oldrev: fa78e9a672af8d36ba455f334824b2262a9517ae X-Git-Newrev: b7b70cba6564e2988f6430e5238d97b5389a6f1d Message-Id: <20230629230135.4D9D1385697D@sourceware.org> Date: Thu, 29 Jun 2023 23:01:35 +0000 (GMT) List-Id: https://gcc.gnu.org/g:b7b70cba6564e2988f6430e5238d97b5389a6f1d commit r13-7513-gb7b70cba6564e2988f6430e5238d97b5389a6f1d Author: Jonathan Wakely Date: Wed May 31 19:05:32 2023 +0100 libstdc++: Fix configure test for 32-bit targets 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. (cherry picked from commit 2a919c08abb2cc5aeb31abb400b3489f67467dbf) Diff: --- 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 6f2c4374048..4adf23a771d 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -5202,7 +5202,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 95b8a8de649..02a931cd096 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -71558,7 +71558,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