(
depends on
https://mail.coreboot.org/hyperkitty/list/seabios@seabios.org/thread/SWDV7MB6KSP2ZJF3SEVB3W3H3SOJMXEB/
"[PATCH] Makefile: Refactor cc-option"

see linux/arch/x86/Makefile for a similar use case
)




Signed-off-by: Fangrui Song <mask...@google.com>
---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 7720db9..eae7ac0 100644
--- a/Makefile
+++ b/Makefile
@@ -59,7 +59,7 @@ CPPFLAGS = -P -MD -MT $@
 COMMONCFLAGS := -I$(OUT) -Isrc -Os -MD -g \
     -Wall -Wno-strict-aliasing -Wold-style-definition \
     $(call cc-option,-Wtype-limits) \
-    -m32 -march=i386 -mregparm=3 -mpreferred-stack-boundary=2 \
+    -m32 -march=i386 -mregparm=3 \
     -minline-all-stringops -fomit-frame-pointer \
     -freg-struct-return -ffreestanding -fno-delete-null-pointer-checks \
     -ffunction-sections -fdata-sections -fno-common -fno-merge-constants
@@ -69,6 +69,7 @@ COMMONCFLAGS += $(call cc-option,-fno-stack-protector)
 COMMONCFLAGS += $(call cc-option,-fno-stack-protector-all)
 COMMONCFLAGS += $(call cc-option,-fstack-check=no)
 COMMONCFLAGS += $(call cc-option,-Wno-address-of-packed-member)
+COMMONCFLAGS += $(call 
cc-option,-mpreferred-stack-boundary=2,-mstack-alignment=4)
 COMMA := ,
 
 CFLAGS32FLAT := $(COMMONCFLAGS) -DMODE16=0 -DMODESEGMENT=0
-- 
2.25.1
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-le...@seabios.org

Reply via email to