git-hulk / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

build assumes x86-64 has 64-bit pointers #323

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The build breaks on a platform where __x86_64__ is predefined, but pointers are 
32 bits rather than 64.  This is so with the nacl64 (nativeclient 64-bit) 
tools.  It might also be true with upcoming -mx32 tools (though I think those 
don't define __x86_64__).

Patch attached.

Original issue reported on code.google.com by mcgra...@google.com on 8 Apr 2011 at 5:26

Attachments:

GoogleCodeExporter commented 9 years ago
Is this the only thing that breaks?  I would have thought some of the code that 
tries to define Atomic32 and Atomic64 would have trouble here as well, but 
maybe not?

Smart to use UINTPTRMAX in the preprocessor!  I would have thrown in another 
configure step; ugly.

Original comment by csilv...@gmail.com on 13 Apr 2011 at 8:25

GoogleCodeExporter commented 9 years ago

Original comment by csilv...@gmail.com on 13 Apr 2011 at 8:27

GoogleCodeExporter commented 9 years ago
That was the only thing that kept the --enable-minimal build from compiling.
 I abandoned using tcmalloc in the context where I was looking at it, so I
didn't actually get as far as checking that things really work.  That said,
the toolchain is likely to change to stop predefining x86_64.

But also, on further reflection there I would have made it: MIN(48,
8*sizeof(void*)).

Original comment by mcgra...@google.com on 13 Apr 2011 at 9:01

GoogleCodeExporter commented 9 years ago
Yes, I agree that's better.  I'll make the change that way.

Original comment by csilv...@gmail.com on 14 Apr 2011 at 12:07

GoogleCodeExporter commented 9 years ago
This should be fixed in perftools 1.8, just released.

Original comment by csilv...@gmail.com on 16 Jul 2011 at 1:27