summaryrefslogtreecommitdiff
path: root/src/pal
diff options
context:
space:
mode:
authorConrad Meyer <cse.cem@gmail.com>2018-01-26 13:31:21 -0800
committerJan Vorlicek <janvorli@microsoft.com>2018-01-26 22:31:21 +0100
commitc8fef83569d8b39b7d8a634579d75b091980d9e9 (patch)
tree9256e228e7251c1ef42a95009417fe4da3c478d0 /src/pal
parentd08b5fd08ea73bebe4acd1af842ef8f212429944 (diff)
downloadcoreclr-c8fef83569d8b39b7d8a634579d75b091980d9e9.tar.gz
coreclr-c8fef83569d8b39b7d8a634579d75b091980d9e9.tar.bz2
coreclr-c8fef83569d8b39b7d8a634579d75b091980d9e9.zip
Fix FreeBSD build and update build instructions (#15998)
Move test code include in global CMakeLists before PAL runtime includes to avoid conflicts between PAL and system headers. (ForeignThreadExceptionsNative.cpp -> thread -> functional -> memory -> cassert -> pal rt "assert.h".) Drop no longer needed remove_definitions lines -- they're only set by the clrdefinitions.cmake include later in the file. Update build instructions to include needed components (ninja, lttng-ust, python27). Add missing ElfW() definition when libunwind does not define it. FreeBSD alloca() is defined in stdlib.h, so include that instead of alloca.h on FreeBSD.
Diffstat (limited to 'src/pal')
-rw-r--r--src/pal/src/exception/remote-unwind.cpp3
-rw-r--r--src/pal/src/numa/numa.cpp4
2 files changed, 7 insertions, 0 deletions
diff --git a/src/pal/src/exception/remote-unwind.cpp b/src/pal/src/exception/remote-unwind.cpp
index 18733ded52..33920eaca8 100644
--- a/src/pal/src/exception/remote-unwind.cpp
+++ b/src/pal/src/exception/remote-unwind.cpp
@@ -63,6 +63,9 @@ SET_DEFAULT_DEBUG_CHANNEL(EXCEPT);
#include <elf.h>
#include <link.h>
+#ifndef ElfW
+#define ElfW(foo) Elf_ ## foo
+#endif
#define Ehdr ElfW(Ehdr)
#define Phdr ElfW(Phdr)
#define Shdr ElfW(Shdr)
diff --git a/src/pal/src/numa/numa.cpp b/src/pal/src/numa/numa.cpp
index 17b71abd89..9b2de94b2b 100644
--- a/src/pal/src/numa/numa.cpp
+++ b/src/pal/src/numa/numa.cpp
@@ -31,7 +31,11 @@ SET_DEFAULT_DEBUG_CHANNEL(NUMA);
#include <pthread.h>
#include <dlfcn.h>
+#ifdef __FreeBSD__
+#include <stdlib.h>
+#else
#include <alloca.h>
+#endif
#include <algorithm>