summaryrefslogtreecommitdiffstats
path: root/CMake
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-10-17 13:31:40 +0200
committerGitHub <noreply@github.com>2020-10-17 13:31:40 +0200
commitf8d72c8fa902f1d9ef19db24ddafbf81852b69ee (patch)
treefbc6b3424d00f42c8eeec72354bca360b61ef804 /CMake
parentadded const correctness on some functions in cPlayer (#4999) (diff)
downloadcuberite-f8d72c8fa902f1d9ef19db24ddafbf81852b69ee.tar
cuberite-f8d72c8fa902f1d9ef19db24ddafbf81852b69ee.tar.gz
cuberite-f8d72c8fa902f1d9ef19db24ddafbf81852b69ee.tar.bz2
cuberite-f8d72c8fa902f1d9ef19db24ddafbf81852b69ee.tar.lz
cuberite-f8d72c8fa902f1d9ef19db24ddafbf81852b69ee.tar.xz
cuberite-f8d72c8fa902f1d9ef19db24ddafbf81852b69ee.tar.zst
cuberite-f8d72c8fa902f1d9ef19db24ddafbf81852b69ee.zip
Diffstat (limited to 'CMake')
-rw-r--r--CMake/Fixups.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/CMake/Fixups.cmake b/CMake/Fixups.cmake
index f671bd6ac..ffe098f6c 100644
--- a/CMake/Fixups.cmake
+++ b/CMake/Fixups.cmake
@@ -4,4 +4,12 @@ function(emit_fixups)
# https://tls.mbed.org/kb/development/arm-thumb-error-r7-cannot-be-used-in-asm-here
target_compile_options(mbedcrypto PRIVATE -fomit-frame-pointer)
endif()
+
+ if(UNIX)
+ execute_process(COMMAND ldd OUTPUT_VARIABLE LDD_OUTPUT ERROR_VARIABLE LDD_OUTPUT)
+ if (LDD_OUTPUT MATCHES musl)
+ # Bring musl stack size in line with other platforms:
+ target_link_options(${CMAKE_PROJECT_NAME} PRIVATE "-Wl,-z,stack-size=1048576")
+ endif()
+ endif()
endfunction()