build system: use -march=i686 for 32bit mingw builds

Boost is built with the same optimizations. And if they're not used then
the linker will spill annoying (but harmless) warnings about »data
section size mismatch«.
This commit is contained in:
Moritz Bunkus 2015-08-10 22:38:44 +02:00
parent 8da73666c7
commit 65b8e83f3e
2 changed files with 3 additions and 0 deletions

View File

@ -111,6 +111,7 @@ def setup_globals
cflags_common += " -Ilib/libebml -Ilib/libmatroska" if c?(:EBML_MATROSKA_INTERNAL)
cflags_common += " #{c(:MATROSKA_CFLAGS)} #{c(:EBML_CFLAGS)} #{c(:EXTRA_CFLAGS)} #{c(:DEBUG_CFLAGS)} #{c(:PROFILING_CFLAGS)} #{c(:USER_CPPFLAGS)}"
cflags_common += " -mno-ms-bitfields -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 " if c?(:MINGW)
cflags_common += " -march=i686" if c?(:MINGW) && /i686/.match(c(:host))
cflags_common += " -fPIE " if c?(:USE_QT) && !c?(:MINGW)
cflags_common += " -DQT_STATICPLUGIN" if c?(:USE_QT) && c?(:MINGW)

View File

@ -38,6 +38,8 @@ desktopdir = $(datadir)/applications
mimepackagesdir = $(datadir)/mime/packages
icondir = $(datadir)/icons/hicolor
host = @host@
# Common programs
AR = @AR@
CC = @CC@