From 3717fb6c8dab919b44361918c6f7c91efac2dcb3 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 31 Aug 2017 19:46:30 +0200 Subject: [PATCH] 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. --- win32/build.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/win32/build.py b/win32/build.py index c6dd7005e..d2b1aef1a 100755 --- a/win32/build.py +++ b/win32/build.py @@ -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')