From dee5cae5f3912e015b9bb9e2a2e414db4cbaf303 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Wed, 24 May 2023 04:19:08 +0300 Subject: [PATCH] scripts: waifulib: compiler_optimizations: set pentium-m minimum cpu requirement for Intel 32-bits, like HLSDK --- scripts/waifulib/compiler_optimizations.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/waifulib/compiler_optimizations.py b/scripts/waifulib/compiler_optimizations.py index 51d1c294..cc996b04 100644 --- a/scripts/waifulib/compiler_optimizations.py +++ b/scripts/waifulib/compiler_optimizations.py @@ -178,6 +178,13 @@ def get_optimization_flags(conf): # remove fvisibility to allow everything to be exported by default cflags.remove('-fvisibility=hidden') + if conf.env.COMPILER_CC != 'msvc' and conf.env.COMPILER_CC != 'owcc': + # HLSDK by default compiles with these options under Linux + # no reason for us to not do the same + if conf.env.DEST_CPU == 'x86': + cflags.append('-march=pentium-m') + cflags.append('-mtune=core2') + # on all compilers (except MSVC?) we need to copy CFLAGS to LINKFLAGS if conf.options.LTO and conf.env.COMPILER_CC != 'msvc': linkflags += cflags