mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9045 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ab9585f38b
commit
364f86d4df
@ -56,13 +56,18 @@ static void *getMemory(unsigned NumBytes) {
|
|||||||
#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
|
#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
|
||||||
# define MAP_ANONYMOUS MAP_ANON
|
# define MAP_ANONYMOUS MAP_ANON
|
||||||
#endif /* defined(MAP_ANON) && !defined(MAP_ANONYMOUS) */
|
#endif /* defined(MAP_ANON) && !defined(MAP_ANONYMOUS) */
|
||||||
#define fd 0
|
|
||||||
#elif defined(sparc) || defined(__sparc__) || defined(__sparcv9)
|
#elif defined(sparc) || defined(__sparc__) || defined(__sparcv9)
|
||||||
#define fd -1
|
/* nothing */
|
||||||
#else
|
#else
|
||||||
std::cerr << "This architecture is not supported by the JIT!\n";
|
std::cerr << "This architecture is not supported by the JIT!\n";
|
||||||
abort();
|
abort();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__linux__)
|
||||||
|
#define fd 0
|
||||||
|
#else
|
||||||
|
#define fd -1
|
||||||
|
#endif
|
||||||
|
|
||||||
unsigned mmapFlags = MAP_PRIVATE|MAP_ANONYMOUS;
|
unsigned mmapFlags = MAP_PRIVATE|MAP_ANONYMOUS;
|
||||||
#ifdef MAP_NORESERVE
|
#ifdef MAP_NORESERVE
|
||||||
|
Loading…
Reference in New Issue
Block a user