Amiga: honor __stack under libnix

Reference __stkinit so the linker pulls swapstack.o from libnix.a;
without it the program runs on the inherited shell stack and crashes
inside Lua / level-gen.
This commit is contained in:
Ingo Paschke
2026-05-03 17:48:15 +02:00
parent c2a7bdb369
commit d9da319622
+5 -1
View File
@@ -22,6 +22,10 @@
#ifdef __SASC_60
long __stack = 256 * 1024;
#else
/* For GCC with -noixemul (libnix), __stack is also recognized */
/* libnix needs __stkinit referenced to pull swapstack.o from libnix.a */
unsigned long __stack = 256 * 1024;
#ifdef CROSS_TO_AMIGA
extern void __stkinit(void);
void *__nh_force_stkinit = __stkinit;
#endif
#endif