Skip to content

Commit 663fc50

Browse files
authored
Merge pull request #3442 from RBergua/SoilDyn_GCC_initialization
SoilDyn initialization crash: stack overflow with MinGW
2 parents 28beea2 + 45f0112 commit 663fc50

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cmake/OpenfastFortranOptions.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ macro(set_fast_gfortran)
133133
set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -fcheck=all,no-array-temps -pedantic -fbacktrace -finit-real=inf -finit-integer=9999." )
134134
endif()
135135

136-
if(CYGWIN)
137-
# increase the default 2MB stack size to 16 MB
136+
if(CYGWIN OR MINGW)
137+
# increase the default 1-2 MB stack size to 16 MB
138138
MATH(EXPR stack_size "16 * 1024 * 1024")
139-
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS},--stack,${stack_size}")
139+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--stack,${stack_size}")
140140
endif()
141141

142142
# Profiling

0 commit comments

Comments
 (0)