[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/Emitter.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Fri Oct 10 22:52:01 PDT 2003
Changes in directory llvm/lib/ExecutionEngine/JIT:
Emitter.cpp updated: 1.27 -> 1.28
---
Log message:
Make mmap's fd for anonymous memory acquisition default to -1, except on
Linux. This is consistent with what FreeBSD and Solaris both want.
This makes the JIT work on FreeBSD 5.1-RELEASE. Whee.
---
Diffs of the changes: (+7 -2)
Index: llvm/lib/ExecutionEngine/JIT/Emitter.cpp
diff -u llvm/lib/ExecutionEngine/JIT/Emitter.cpp:1.27 llvm/lib/ExecutionEngine/JIT/Emitter.cpp:1.28
--- llvm/lib/ExecutionEngine/JIT/Emitter.cpp:1.27 Fri Oct 10 13:46:26 2003
+++ llvm/lib/ExecutionEngine/JIT/Emitter.cpp Fri Oct 10 22:51:18 2003
@@ -56,12 +56,17 @@
#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
# define MAP_ANONYMOUS MAP_ANON
#endif /* defined(MAP_ANON) && !defined(MAP_ANONYMOUS) */
-#define fd 0
#elif defined(sparc) || defined(__sparc__) || defined(__sparcv9)
-#define fd -1
+/* nothing */
#else
std::cerr << "This architecture is not supported by the JIT!\n";
abort();
+#endif
+
+#if defined(__linux__)
+#define fd 0
+#else
+#define fd -1
#endif
unsigned mmapFlags = MAP_PRIVATE|MAP_ANONYMOUS;
More information about the llvm-commits
mailing list