[SeaBIOS] [PATCH] Fix build issue on gcc34

Kevin O'Connor kevin at koconnor.net
Wed Nov 12 23:59:10 CET 2014


Older versions of gcc may not inline on_extra_stack() and thus cause a
link error when compiling in 32bit segmented mode.  Test for MODE16
explicitly in stack_hop_back() to prevent the problem.

Signed-off-by: Kevin O'Connor <kevin at koconnor.net>
---
 src/stacks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/stacks.c b/src/stacks.c
index 6f40cbe..0c033d1 100644
--- a/src/stacks.c
+++ b/src/stacks.c
@@ -430,7 +430,7 @@ stack_hop_back(u32 eax, u32 edx, void *func)
 {
     if (!MODESEGMENT)
         return call16_back(eax, edx, func);
-    if (!on_extra_stack())
+    if (!MODE16 || !on_extra_stack())
         return ((u32 (*)(u32, u32))func)(eax, edx);
     ASSERT16();
     u16 bkup_ss;
-- 
1.9.3




More information about the SeaBIOS mailing list