summaryrefslogtreecommitdiffstats
path: root/CMake
diff options
context:
space:
mode:
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()