[LLVMdev] Patch for NetBSD support in CBackend.cpp
Krister Walfridsson
cato at df.lth.se
Fri Jan 11 11:10:37 PST 2008
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"
More information about the llvm-dev
mailing list