From bbac8263560dc88c5da9c9726da5306e3af08678 Mon Sep 17 00:00:00 2001
From: Ismael Luceno <ismael@iodev.co.uk>
Date: Sat, 8 Jun 2024 21:05:58 +0200
Subject: [PATCH 15/23] mconfig: Simplify optimization flag selection

Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
---
 mconfig | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/mconfig b/mconfig
index 6d88bd691baf..c2b99fe020b3 100644
--- a/mconfig
+++ b/mconfig
@@ -21,17 +21,16 @@ HAVE_SYSVINIT=no
 
 
 # Different optimizations for different cpus.
+OPT = -pipe -O2 -fomit-frame-pointer
 ifeq "$(ARCH)" "intel"
   ifeq "$(CPU)" "i386"
-    OPT=	-pipe -O2 -m386 -fomit-frame-pointer
+    OPT += -m386
   else
-    OPT=	-pipe -O2 -m486 -fomit-frame-pointer
+    OPT += -m486
   endif
 else 
   ifeq "$(ARCH)" "arm"
-    OPT=	-pipe -O2 -fsigned-char -fomit-frame-pointer
-  else
-    OPT=	-O2 -fomit-frame-pointer
+    OPT += -fsigned-char
   endif
 endif
 
-- 
2.44.0

