summaryrefslogtreecommitdiff
path: root/clrdefinitions.cmake
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2016-10-04 02:56:42 +0200
committerGitHub <noreply@github.com>2016-10-04 02:56:42 +0200
commit9c506048df2e03002eda612966977b739b585aba (patch)
treea3c044a33188139f08604a1e997e2f241a121b01 /clrdefinitions.cmake
parent3c67761c09e029569466ef1e96a2b0d67873c8a3 (diff)
downloadcoreclr-9c506048df2e03002eda612966977b739b585aba.tar.gz
coreclr-9c506048df2e03002eda612966977b739b585aba.tar.bz2
coreclr-9c506048df2e03002eda612966977b739b585aba.zip
Add support for Alpine Linux (#7440)
This change enables build of CoreCLR on Alpine Linux. Here is the list of changes: - Disable asserts checking RSP in arbitrary threads against cached stack limit for the respective thread. The stack on Alpine obviously grows over the limit reported by the pthread functions. - Disable using XSTATE. This should be re-enabled after MUSL gets the _xstate, _fpx_sw_bytes and related data structures added to the signal.h header. - Disable setting rlimit of RLIMIT_NOFILE to the max value, since it breaks debugging for some reason. - Add skipping over the hardware signal trampoline in the PAL_VirtualUnwind. While we were not trying to walk over it in a simple case, in a case where an exception was thrown from a catch handler of a hardware exception, we still attempted to walk over it and it fails on Alpine. - Fix detection of Alpine Linux in the PAL's CMakeLists.txt so that it works in Docker containers too. - Modified PAL_VirtualUnwind to make the check for unwinding past the bottom of the stack unconditional. We had a long list of platforms where we were doing this check and it doesn't hurt to do it on platforms where it is not needed. I have done that rather than adding a check for Alpine Linux as another platform that needs it.
Diffstat (limited to 'clrdefinitions.cmake')
-rw-r--r--clrdefinitions.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/clrdefinitions.cmake b/clrdefinitions.cmake
index e088f12472..135e8c2c6e 100644
--- a/clrdefinitions.cmake
+++ b/clrdefinitions.cmake
@@ -61,6 +61,12 @@ if (CLR_CMAKE_PLATFORM_UNIX)
endif(CLR_CMAKE_PLATFORM_UNIX)
+if(CLR_CMAKE_PLATFORM_ALPINE_LINUX)
+ # Alpine Linux doesn't have fixed stack limit, this define disables some stack pointer
+ # sanity checks in debug / checked build that rely on a fixed stack limit
+ add_definitions(-DNO_FIXED_STACK_LIMIT)
+endif(CLR_CMAKE_PLATFORM_ALPINE_LINUX)
+
add_definitions(-D_BLD_CLR)
add_definitions(-DDEBUGGING_SUPPORTED)
add_definitions(-DPROFILING_SUPPORTED)