aboutsummaryrefslogtreecommitdiff
path: root/sim/m4
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2024-01-10 22:25:51 -0500
committerMike Frysinger <vapier@gentoo.org>2024-01-10 22:37:03 -0500
commit08a7937f3a7301254e0ee98a93d94010e4ce5c5a (patch)
treea811637e83fc126ccfd8ee86927d7ff9d21d9390 /sim/m4
parentdbd4aebe5ba95f95735e333e5483ad4a80726a08 (diff)
downloadgdb-08a7937f3a7301254e0ee98a93d94010e4ce5c5a.zip
gdb-08a7937f3a7301254e0ee98a93d94010e4ce5c5a.tar.gz
gdb-08a7937f3a7301254e0ee98a93d94010e4ce5c5a.tar.bz2
sim: m32r: fixup some of the int<->pointer casts
The m32r trap code was written for a 32-bit Linux host (and really, one whose Linux ABI matched pretty exactly). This has lead to conversions between integers and pointers which breaks down hard on 64-bit hosts. Clean up some of the functions where possible to avoid unnecessary conversions, use uintptr_t to cast 32-bit target pointers to host pointers in some places, and just stub out a few functions that can't easily be salvaged currently when sizeof(void*) is not 32-bits. This is a bit ugly, but lets us enable warnings for the whole file.
Diffstat (limited to 'sim/m4')
-rw-r--r--sim/m4/sim_ac_platform.m42
1 files changed, 2 insertions, 0 deletions
diff --git a/sim/m4/sim_ac_platform.m4 b/sim/m4/sim_ac_platform.m4
index fd6daee..fa099f2 100644
--- a/sim/m4/sim_ac_platform.m4
+++ b/sim/m4/sim_ac_platform.m4
@@ -133,6 +133,8 @@ AC_CHECK_TYPES(socklen_t, [], [],
#include <sys/socket.h>
])
+AC_CHECK_SIZEOF([void *])
+
dnl Check for struct statfs.
AC_CACHE_CHECK([for struct statfs],
[sim_cv_struct_statfs],