From 36d3b83e9c7bcb2a27902006d1409a3583fb0015 Mon Sep 17 00:00:00 2001 From: deadprogram Date: Wed, 15 Jul 2026 18:57:45 +0200 Subject: [PATCH] builder: add chkstk2.S to windows/386 builtins for __alloca symbol Clang on i386 mingw emits calls to _alloca (decorated as __alloca) for stack probing. This was provided by chkstk2.S, not chkstk.S which only provides __chkstk_ms. Signed-off-by: deadprogram --- builder/builtins.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builder/builtins.go b/builder/builtins.go index 1feeb5d5a..60db1f28d 100644 --- a/builder/builtins.go +++ b/builder/builtins.go @@ -204,7 +204,8 @@ var avrBuiltins = []string{ // Builtins needed specifically for windows/386. var windowsI386Builtins = []string{ - "i386/chkstk.S", // also _alloca + "i386/chkstk.S", // __chkstk_ms + "i386/chkstk2.S", // _alloca (__alloca) } // Builtins needed specifically for windows/amd64.