evilsong / gperftools

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

Autoconf test for working mmap is meaningless (and fails) when cross-compiling #449

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

$ ./configure --build=x86_64-pc-linux-gnu --host=powerpc64-pc-linux-gnu 
--disable-shared --with-pic --enable-minimal

What is the expected output? What do you see instead?

Expected is that there will be no test for a "working mmap" because it's not 
possible to execute, on the build system, binaries produced for the host 
system, and testing for a working mmap on the build system gives no information 
about whether mmap would work on the host system anyway, so it's both broken 
and pointless.

The actual behavior is that the check for a working mmap fails, and then the 
subsequent compilation fails due to "failed_" being an undefined symbol.

What version of the product are you using? On what operating system?

This is gperftools-2.0 checked out from the Subversion tag.

Please provide any additional information below.

Attached is a patch to configure.ac that bypasses the mmap check when 
cross-compiling. The assumption is that the mmap on the host system works.

Original issue reported on code.google.com by mwhitl...@gmail.com on 24 Jul 2012 at 6:51

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by chapp...@gmail.com on 3 Nov 2012 at 4:56

GoogleCodeExporter commented 9 years ago
r179 | chappedm@gmail.com | 2012-11-04 14:12:42 -0500 (Sun, 04 Nov 2012) | 1 
line

issue-449: Disables mmap check when cross compiling since it is meaningless 
anyways

Original comment by chapp...@gmail.com on 4 Nov 2012 at 7:13