Krister Walfridsson
2008-Jan-11 19:10 UTC
[LLVMdev] Patch for NetBSD support in CBackend.cpp
NetBSD does not have alloca.h, so CBackend.cpp need to handle NetBSD in the same way as FreeBSD and OpenBSD, as in the attached patch. /Krister -------------- next part -------------- Index: CBackend.cpp ==================================================================--- CBackend.cpp (revision 45865) +++ CBackend.cpp (working copy) @@ -1323,7 +1323,7 @@ static void generateCompilerSpecificCode << "extern void *__builtin_alloca(unsigned int);\n" << "#endif\n" << "#define alloca(x) __builtin_alloca(x)\n" - << "#elif defined(__FreeBSD__) || defined(__OpenBSD__)\n" + << "#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)\n" << "#define alloca(x) __builtin_alloca(x)\n" << "#elif defined(_MSC_VER)\n" << "#define inline _inline\n"
On Jan 11, 2008, at 11:10 AM, Krister Walfridsson wrote:> NetBSD does not have alloca.h, so CBackend.cpp need to handle NetBSD > in the same way as FreeBSD and OpenBSD, as in the attached patch.Applied, thanks! http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080107/057128.html -Chris