File dolphin-emu-2.0.rev6314-cflags.patch of Package dolphin-emu
Index: SConstruct
===================================================================
--- SConstruct.orig
+++ SConstruct
@@ -3,6 +3,7 @@
import os
import sys
import platform
+import SCons.Util
# Home made tests
from SconsTests import utils
@@ -12,7 +13,7 @@ from SconsTests import wxconfig
EnsureSConsVersion(1, 2)
# Construction presets for platform
-env = Environment(ENV = os.environ)
+env = Environment(ENV = os.environ, CCFLAGS = SCons.Util.CLVar(os.environ['CCFLAGS']))
# Handle command line options
vars = Variables('args.cache')
@@ -75,10 +76,6 @@ if not env['verbose']:
if not env['flavor'] == 'debug':
env['CCFLAGS'] += ['-O3']
-if env['flavor'] == 'release':
- env['CCFLAGS'] += ['-fomit-frame-pointer']
-elif not env['flavor'] == 'fastlog':
- env['CCFLAGS'] += ['-ggdb']
env['CCFLAGS'] += ['-fno-exceptions', '-fno-strict-aliasing']
if env['CCVERSION'] >= '4.2.0':
env['CCFLAGS'] += ['-fvisibility=hidden']
@@ -87,12 +84,7 @@ if env['CCVERSION'] >= '4.2.0':
if env['lint']:
env['CCFLAGS'] += ['-Werror']
env['CCFLAGS'] += ['-Wall', '-Wextra']
-env['CCFLAGS'] += ['-Wno-missing-field-initializers', '-Wno-unused-parameter']
env['CCFLAGS'] += ['-Wpacked', '-Wpointer-arith', '-Wshadow', '-Wwrite-strings']
-if env['CCVERSION'] < '4.2.0':
- env['CCFLAGS'] += ['-Wno-pragmas']
-if env['CCVERSION'] >= '4.3.0':
- env['CCFLAGS'] += ['-Wno-array-bounds', '-Wno-unused-result']
env['CPPDEFINES'] = []
if env['flavor'] == 'debug':
@@ -186,11 +178,10 @@ elif sys.platform == 'win32':
pass
else:
- env['CCFLAGS'] += ['-fPIC', '-msse2']
+ env['CCFLAGS'] += ['-fPIC', '-msse2', '-mfpmath=sse']
env['CPPPATH'].insert(0, '#') # Make sure we pick up our own config.h
if sys.platform == 'linux2':
env['CPPDEFINES'] += [('_FILE_OFFSET_BITS', 64), '_LARGEFILE_SOURCE']
- env['CXXFLAGS'] += ['-Wno-deprecated'] # XXX <hash_map>
env['LINKFLAGS'] += ['-pthread', '-ldl']
env['RPATH'] = []