Fix NetBSD build issue: Use compiler version of alloca(3) when possible
authorKamil Rytarowski <n54@gmx.com>
Tue, 16 Feb 2016 21:55:13 +0000 (22:55 +0100)
committerKamil Rytarowski <n54@gmx.com>
Wed, 17 Feb 2016 20:30:25 +0000 (21:30 +0100)
commit6952d90ad3edfc461ecbe081f121419f4072326c
tree3cb6501aa8bd1a278994bfa5dc9b0494e481f1fd
parent5a26372691fea92f1ef328f287e1e37243af3e34
Fix NetBSD build issue: Use compiler version of alloca(3) when possible

The documentation of alloca(3) says:

     o   The alloca() function should be supplied by the compiler because the
         compiler is allowed to make assumptions about the stack and frame
         pointers.  The libc alloca() implementation cannot account for those
         assumptions.  While there is a machine dependent implementation of
         alloca() in libc, its use is discouraged and in most cases it will
         not work.  Using this implementation will produce linker warnings.

This is true for CoreCLR - alloca(3) was breaking 30 PAL tests.

Enforce on this operating system a compiler version.

Thanks Jan Kotas (Microsoft) for inspiration what may go wrong.
Thanks Jan Vorli (Microsoft) for useful suggestions in order to fix it.
src/ToolBox/SOS/Strike/strike.h
src/pal/inc/pal.h
src/pal/src/CMakeLists.txt
src/pal/src/include/pal/palinternal.h