diff mbox

[U-Boot,1/2] x86: Use default stack boundary alignment

Message ID 1500802657-26243-1-git-send-email-bmeng.cn@gmail.com
State Superseded
Delegated to: Bin Meng
Headers show

Commit Message

Bin Meng July 23, 2017, 9:37 a.m. UTC
At present U-Boot x86 build is using -mpreferred-stack-boundary=2
which is 4 bytes stack boundary alignment. With 64-bit U-Boot, the
minimal required stack boundary alignment is 16 bytes.

If -mpreferred-stack-boundary is not specified, the default is 4
(16 bytes). Switch to use the default one.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 arch/x86/config.mk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Simon Glass Aug. 1, 2017, 9:10 a.m. UTC | #1
On 23 July 2017 at 03:37, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> At present U-Boot x86 build is using -mpreferred-stack-boundary=2
> which is 4 bytes stack boundary alignment. With 64-bit U-Boot, the
> minimal required stack boundary alignment is 16 bytes.
>
> If -mpreferred-stack-boundary is not specified, the default is 4
> (16 bytes). Switch to use the default one.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
>  arch/x86/config.mk | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox

Patch

diff --git a/arch/x86/config.mk b/arch/x86/config.mk
index 74b87ce..043425e 100644
--- a/arch/x86/config.mk
+++ b/arch/x86/config.mk
@@ -10,8 +10,7 @@  CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000
 PLATFORM_CPPFLAGS += -fno-strict-aliasing
 PLATFORM_CPPFLAGS += -fomit-frame-pointer
 PF_CPPFLAGS_X86   := $(call cc-option, -fno-toplevel-reorder, \
-		       $(call cc-option, -fno-unit-at-a-time)) \
-		     $(call cc-option, -mpreferred-stack-boundary=2)
+		     $(call cc-option, -fno-unit-at-a-time))
 
 PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_X86)
 PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm