From a3603f497d59aca1da4d47c1a8a80e885d29c7e4 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Wed, 24 May 2023 04:30:28 +0300 Subject: [PATCH] scripts: waifulib: compiler_optimizations: fix -march applying on x86_64 toolchains forced to compile in 32-bit mode --- scripts/waifulib/compiler_optimizations.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/waifulib/compiler_optimizations.py b/scripts/waifulib/compiler_optimizations.py index cc996b04..64f1e623 100644 --- a/scripts/waifulib/compiler_optimizations.py +++ b/scripts/waifulib/compiler_optimizations.py @@ -181,7 +181,9 @@ def get_optimization_flags(conf): 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': + + # TODO: fix DEST_CPU in force 32 bit mode + if conf.env.DEST_CPU == 'x86' or (conf.env.DEST_CPU == 'x86_64' and conf.env.DEST_SIZEOF_VOID_P == 4): cflags.append('-march=pentium-m') cflags.append('-mtune=core2')