Thread (1 message) 1 message, 1 author, 2011-05-26

[PATCH] ARM: Do not allow unaligned accesses when CONFIG_ALIGNMENT_TRAP

From: Måns Rullgård <hidden>
Date: 2011-05-26 18:22:08
Also in: lkml

Will Deacon [off-list ref] writes:
This issue seems to be caused by passing -fconserve-stack to GCC. This
was added in 8f7f5c9f ("kbuild: set -fconserve-stack option for gcc
4.5") and as you can see from the archive:

http://lkml.org/lkml/2009/9/20/39

it was thought to only have an impact on inlining decisions. Looking at
the documentation for GCC 4.6:

-fconserve-stack
          Attempt to minimize stack usage. The compiler will attempt to
use less stack space, even if that makes the program slower. This option
implies setting the ?large-stack-frame? parameter to 100 and the
?large-stack-frame-growth? parameter to 400.

So it sounds like we might not want to enable this blindly across all
architectures. Indeed, on ARM, it encourages the compiler to pack
variables on the stack which leads to the weird and wonderful alignment
situation that has been encountered in this thread.

Can we remove -fconserve-stack from the top-level Makefile (or at least
make it conditional by architecture)?
Sounds like a good idea to me.

-- 
M?ns Rullg?rd
mans at mansr.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help