This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [testsuite] Provide and use mmap effective-target keyword
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 26 Jul 2011 20:17:27 +0200
- Subject: Re: [testsuite] Provide and use mmap effective-target keyword
- References: <201107261753.p6QHrrPl005360@d06av02.portsmouth.uk.ibm.com>
Ulrich,
> Rainer Orth wrote:
>
>> +proc check_effective_target_mmap {} {
>> + return [check_no_compiler_messages mmap assembly {
>> + #include <sys/mman.h>
>> + }]
>> +}
>
> Unfortunately, this test breaks spu-elf; a lot of tests now fail with:
> loop-2f.c:(.text+0x100): undefined reference to `mmap'
>
> The problem is that we *do* have sys/mman.h on SPU, it just does not
> contain a mmap prototype (and there is no mmap routine). Instead,
> sys/mman.h on SPU has prototypes and defines for "mmap_eaddr" and
> the like, which allow SPU programs to manipulate PPU-side memory
> mappings (to be accessed via DMA) ...
>
> Can the test be extended to actually check for the mmap routine
> itself?
sure, that's one of the reasons to centralize the mmap test. Simply
replacing the body of the proc with
return [check_function_available "mmap"]
should work. Could you give it a try?
Thanks.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University