This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] libmudflap mmap configury


libmudflap by default always emits wrappers for mmap and munmap. 
Unfortunately, if the target does not support mmap, this means we end up
with a linker error for an undefined reference to mmap, as the
mmap wrapper calls the real mmap.  The same goes for munmap.

This is easy to fix, as libmudflap already has a configure test for
mmap.  We just need to modify the code to use it.  I added an ifdef
around the mmap and munmap wrappers to test HAVE_MMAP.

This was tested on mainline for x86_64-linux with a C and C++ build and
a libmudflap make check.  There were no regressions.  I hand checked the
result to make sure the mmap wrapper was still there.  This was also
tested with gcc-4.0.1 for a mips-elf cross compiler (with a lot of
patches and hacks added in) and it eliminates many linker errors for
undefined references to mmap.

Since this is a simple patch, I went ahead and checked it in.
-- 
Jim Wilson, GNU Tools Support, http://www.specifix.com

Attachment: patch.mmap.ifdef
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]