summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt19
-rw-r--r--Documentation/building/freebsd-instructions.md3
-rw-r--r--src/pal/src/exception/remote-unwind.cpp3
-rw-r--r--src/pal/src/numa/numa.cpp4
4 files changed, 17 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8057d67a28..e59995ddcf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -588,6 +588,13 @@ if(WIN32)
add_compile_options(/Zl) # omit default library name in .OBJ
endif(WIN32)
+#------------------------------
+# Add Test Directory
+#------------------------------
+if(CLR_CMAKE_BUILD_TESTS)
+ add_subdirectory(tests)
+endif(CLR_CMAKE_BUILD_TESTS)
+
#--------------------------------
# Definition directives
# - all clr specific compile definitions should be included in this file
@@ -622,16 +629,4 @@ set(BuildToolsDir "${CLR_CMAKE_PACKAGES_DIR}/Microsoft.DotNet.BuildTools.CoreCLR
#------------------------------
add_subdirectory(src)
-#------------------------------
-# Add Test Directory
-#------------------------------
-if(CLR_CMAKE_BUILD_TESTS)
- # remove some definitions for test build
- remove_definitions(-D_SECURE_SCL=0)
- remove_definitions(-DUNICODE)
- remove_definitions(-D_UNICODE)
-
- add_subdirectory(tests)
-endif(CLR_CMAKE_BUILD_TESTS)
-
include(definitionsconsistencycheck.cmake)
diff --git a/Documentation/building/freebsd-instructions.md b/Documentation/building/freebsd-instructions.md
index e925f6b539..9d29a930cb 100644
--- a/Documentation/building/freebsd-instructions.md
+++ b/Documentation/building/freebsd-instructions.md
@@ -23,6 +23,9 @@ Install the following packages for the toolchain:
- libunwind
- gettext
- icu
+- ninja (optional)
+- lttng-ust
+- python27
To install the packages you need:
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>