> Why don't you look in the libc headers and see how it defines > uintptr_t. In my native x86_64 system I see: > > /* Types for `void *' pointers. */ > #if __WORDSIZE == 64 > ... > typedef unsigned long int uintptr_t; > #else > ... > typedef unsigned int uintptr_t; > #endif > > If your headers look sensible, figure out what is wrong when you > compile libmudflap such that the wrong definition is used. xgcc is pointing at my sysroot, and the libraries are there. This looks like a problem when cross-compiling gcc for X86_64. > Noone else > has access to the files on your system so you're in the best position > to investigate it. > That's easy to fix. I've attached the makefile I use to do this, and the one patch file I created (incorporating Ian's suggestion about patching mf-runtime.c). All the other files are either straight from the gnu.org servers: binutils-2.20.1.tar.bz2, gcc-4.6.1.tar.bz2, glibc-2.14.tar.bz2, make-3.81.tar.bz2 or straight from kernel.org: linux-2.6.39.4.tar.bz2 Drop the patch and tarballs into ~/Downloads (or where-ever, and set TARBALL_SOURCE to point there), and do a "make clean all" on an X86-64 machine.
Attachment:
Makefile
Description: Binary data
--- ./libmudflap/mf-runtime.c.orig 2011-08-05 16:24:24.124379402 -0500 +++ ./libmudflap/mf-runtime.c 2011-08-05 16:25:05.334457621 -0500 @@ -165,7 +165,7 @@ #define LOOKUP_CACHE_SHIFT_DFL 2 struct __mf_cache __mf_lookup_cache [LOOKUP_CACHE_SIZE_MAX]; -uintptr_t __mf_lc_mask = LOOKUP_CACHE_MASK_DFL; +__mf_uintptr_t __mf_lc_mask = LOOKUP_CACHE_MASK_DFL; unsigned char __mf_lc_shift = LOOKUP_CACHE_SHIFT_DFL; #define LOOKUP_CACHE_SIZE (__mf_lc_mask + 1)