Skip to content

Commit 7c5d005

Browse files
authored
fixes #10625; setjmp on linux mangles ebp leading to early collection (#24787)
fixes #10625
1 parent 2b699bc commit 7c5d005

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/extccomp.nim

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,11 @@ proc noAbsolutePaths(conf: ConfigRef): bool {.inline.} =
474474
proc cFileSpecificOptions(conf: ConfigRef; nimname, fullNimFile: string): string =
475475
result = conf.compileOptions
476476

477+
if (conf.cCompiler == ccGcc or conf.cCompiler == ccCLang) and
478+
conf.selectedGC == gcRefc:
479+
# bug #10625
480+
addOpt(result, "-fno-omit-frame-pointer")
481+
477482
for option in conf.compileOptionsCmd:
478483
if strutils.find(result, option, 0) < 0:
479484
addOpt(result, option)

0 commit comments

Comments
 (0)