]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix configure test for 32-bit targets
authorJonathan Wakely <jwakely@redhat.com>
Wed, 31 May 2023 18:05:32 +0000 (19:05 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 31 May 2023 19:57:30 +0000 (20:57 +0100)
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
libstdc++-v3/configure

index eb30c4f00a5c086145551ac1b334dde86fa564c0..ca776974832d9d42c73052aa5311bd59e9463029 100644 (file)
@@ -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
index 4db8a2840832f65f96262eb7ea17040286f79b4d..f573dfced2e848d813abb6f96bcd18c2facfd371 100755 (executable)
@@ -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