1
0

MUSL stack size (#4995)

This commit is contained in:
Tiger Wang 2020-10-17 12:31:40 +01:00 committed by GitHub
parent c07ea7b9ab
commit f8d72c8fa9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,4 +4,12 @@ function(emit_fixups)
# https://tls.mbed.org/kb/development/arm-thumb-error-r7-cannot-be-used-in-asm-here # https://tls.mbed.org/kb/development/arm-thumb-error-r7-cannot-be-used-in-asm-here
target_compile_options(mbedcrypto PRIVATE -fomit-frame-pointer) target_compile_options(mbedcrypto PRIVATE -fomit-frame-pointer)
endif() 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() endfunction()