win32/build.py: add -march=pentium3 to fix 32 bit LAME build

Workaround for the following LAME build failure:

 error: inlining failed in call to always_inline '_mm_sqrt_ps': target
 specific option mismatch

This is because the LAME build scripts do not check whether SSE is
available; they only check for the presence of the "xmmintrin.h"
header.

Requiring a Pentium 3 CPU is reasonable enough, and it's the first CPU
to feature SSE support.
This commit is contained in:
Max Kellermann 2017-08-31 19:46:30 +02:00
parent f6abbc01bd
commit 3717fb6c8d
1 changed files with 5 additions and 0 deletions

View File

@ -51,6 +51,11 @@ class CrossGccToolchain:
self.strip = os.path.join(toolchain_bin, arch + '-strip')
common_flags = ''
if not x64:
# enable SSE support which is required for LAME
common_flags += ' -march=pentium3'
self.cflags = '-O2 -g ' + common_flags
self.cxxflags = '-O2 -g ' + common_flags
self.cppflags = '-isystem ' + os.path.join(install_prefix, 'include')