From: Jonathan Wakely <jwakely@redhat.com>
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 [thread overview]
Message-ID: <20230531200257.6784-1-jwakely@redhat.com> (raw)
In-Reply-To: <20230531122222.4116868-1-jwakely@redhat.com>
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
--
2.40.1
next prev parent reply other threads:[~2023-05-31 20:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-31 12:22 [committed] libstdc++: Fix preprocessor conditions for std::from_chars [PR109921] Jonathan Wakely
2023-05-31 20:02 ` Jonathan Wakely [this message]
2023-05-31 20:05 ` [committed] libstdc++: Fix build for targets without _Float128 [PR109921] Jonathan Wakely
2023-06-01 9:29 ` [committed] libstdc++: Fix preprocessor conditions for std::from_chars [PR109921] Christophe Lyon
2023-06-01 11:05 ` Jonathan Wakely
2023-06-29 12:49 ` Jonathan Wakely
2023-06-29 13:25 ` Christophe Lyon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230531200257.6784-1-jwakely@redhat.com \
--to=jwakely@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).