From 746aa8b1cc19b51e6ebf9afb759c725548d87127 Mon Sep 17 00:00:00 2001 From: nillerusr Date: Tue, 7 Feb 2023 02:11:36 +0300 Subject: [PATCH] wscript: fix arm build --- scripts/waifulib/compiler_optimizations.py | 4 ++-- wscript | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/waifulib/compiler_optimizations.py b/scripts/waifulib/compiler_optimizations.py index 73de2120..fe64efc3 100644 --- a/scripts/waifulib/compiler_optimizations.py +++ b/scripts/waifulib/compiler_optimizations.py @@ -61,8 +61,8 @@ CFLAGS = { }, 'fastnative': { 'msvc': ['/O2', '/Oy', '/MT'], - 'gcc': ['-Ofast', '-march=native', '-funsafe-math-optimizations', '-funsafe-loop-optimizations', '-fomit-frame-pointer'], - 'clang': ['-Ofast', '-march=native'], + 'gcc': ['-O2', '-march=native', '-funsafe-math-optimizations', '-funsafe-loop-optimizations', '-fomit-frame-pointer'], + 'clang': ['-O2', '-march=native'], 'default': ['-O3'] }, 'release': { diff --git a/wscript b/wscript index c2f86949..84f00019 100644 --- a/wscript +++ b/wscript @@ -370,13 +370,13 @@ def configure(conf): ] flags += ['-funwind-tables', '-fvisibility=default'] - elif conf.env.COMPILER_CC != 'msvc' and conf.env.DEST_OS != 'darwin': - flags += ['-march=native'] + elif conf.env.COMPILER_CC != 'msvc' and conf.env.DEST_OS != 'darwin' and conf.env.DEST_CPU in ['x86', 'x86_64']: + flags += ['-march=core2'] if conf.env.DEST_CPU in ['x86', 'x86_64']: flags += ['-mfpmath=sse'] elif conf.env.DEST_CPU in ['arm', 'aarch64']: - flags += ['-fsigned-char'] + flags += ['-fsigned-char', '-mfpu=neon-vfpv4'] if conf.env.DEST_OS == 'freebsd': linkflags += ['-lexecinfo']