------- Comment #21 from hjl dot tools at gmail dot com 2008-02-07 22:15 ------- The real problem is i386 gcc expects 16 byte stack boundary while the psABI specifies 4 byte. When you link a callee, which expects incoming stack at 16 byte boundary, with a caller, which only guarantees 4 byte stack boundary, you will run into problem. The stack alignment branch can automatically align the incoming stack. But we have to generate 16byte stack boundary when calling a function by default since callees compiled by older gcc expects 16 byte stack boundary. Since incoming stack is aligned at 16byte by default, the stack alignment branch still assumes incoming stack aligned at 16 byte by default. You can override it with -mstackrealign or force_align_arg_pointer attribute, which will assume incoming stack is aligned at 4 byte.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32893