aboutsummaryrefslogtreecommitdiffstats
path: root/mk/embedded.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/embedded.mk')
-rw-r--r--mk/embedded.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/mk/embedded.mk b/mk/embedded.mk
index 5a7632e9..1614d8bc 100644
--- a/mk/embedded.mk
+++ b/mk/embedded.mk
@@ -38,7 +38,12 @@ GCCOPT += $(call gcc_ok,-ffreestanding,)
GCCOPT += $(call gcc_ok,-fno-stack-protector,)
GCCOPT += $(call gcc_ok,-fwrapv,)
GCCOPT += $(call gcc_ok,-freg-struct-return,)
+ifdef EFI_BUILD
GCCOPT += -Os -fomit-frame-pointer -msoft-float
+else
+GCCOPT += -Os -fomit-frame-pointer -mregparm=3 -DREGPARM=3 \
+ -msoft-float
+endif
GCCOPT += $(call gcc_ok,-fno-exceptions,)
GCCOPT += $(call gcc_ok,-fno-asynchronous-unwind-tables,)
GCCOPT += $(call gcc_ok,-fno-strict-aliasing,)