diff options
author | Jakob Bornecrantz <jakob@vmware.com> | 2009-06-14 16:56:34 +0200 |
---|---|---|
committer | Jakob Bornecrantz <jakob@vmware.com> | 2009-06-14 16:56:34 +0200 |
commit | 2fe65e8f149e961afb8ccd9b1e57c5c7e96ecfd6 (patch) | |
tree | 4eecf639463b6fa8b25d9e838e692c6b34a22b43 /scons | |
parent | 6791576f6cc90018bd65c263fa6c16ad2b19cdae (diff) | |
parent | b799af91d5ffbee1481161fec29eb4c92b161272 (diff) |
Merge branch 'mesa_7_5_branch'
Diffstat (limited to 'scons')
-rw-r--r-- | scons/dxsdk.py | 8 | ||||
-rw-r--r-- | scons/gallium.py | 11 |
2 files changed, 12 insertions, 7 deletions
diff --git a/scons/dxsdk.py b/scons/dxsdk.py index a369e1da1..de090e4f9 100644 --- a/scons/dxsdk.py +++ b/scons/dxsdk.py @@ -40,10 +40,11 @@ def get_dxsdk_root(env): except KeyError: return None -def get_dxsdk_paths(env): +def generate(env): dxsdk_root = get_dxsdk_root(env) if dxsdk_root is None: - raise SCons.Errors.InternalError, "DirectX SDK not found" + # DirectX SDK not found + return if env['machine'] in ('generic', 'x86'): target_cpu = 'x86' @@ -57,9 +58,6 @@ def get_dxsdk_paths(env): env.Prepend(CPPPATH = [os.path.join(dxsdk_root, 'Include')]) env.Prepend(LIBPATH = [os.path.join(dxsdk_root, 'Lib', target_cpu)]) -def generate(env): - get_dxsdk_paths(env) - def exists(env): return get_dxsdk_root(env) is not None diff --git a/scons/gallium.py b/scons/gallium.py index aed813f02..7be0a2500 100644 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -325,8 +325,10 @@ def generate(env): if gcc: if debug: ccflags += ['-O0', '-g3'] - elif env['toolchain'] == 'crossmingw': - ccflags += ['-O0', '-g3'] # mingw 4.2.1 optimizer is broken + elif env['CCVERSION'].startswith('4.2.'): + # gcc 4.2.x optimizer is broken + print "warning: gcc 4.2.x optimizer is broken -- disabling optimizations" + ccflags += ['-O0', '-g3'] else: ccflags += ['-O3', '-g3'] if env['profile']: @@ -449,11 +451,15 @@ def generate(env): # Linker options linkflags = [] + shlinkflags = [] if gcc: if env['machine'] == 'x86': linkflags += ['-m32'] if env['machine'] == 'x86_64': linkflags += ['-m64'] + shlinkflags += [ + '-Wl,-Bsymbolic', + ] if platform == 'windows' and msvc: # See also: # - http://msdn2.microsoft.com/en-us/library/y0zzbyt4.aspx @@ -501,6 +507,7 @@ def generate(env): '/entry:_DllMainCRTStartup', ] env.Append(LINKFLAGS = linkflags) + env.Append(SHLINKFLAGS = shlinkflags) # Default libs env.Append(LIBS = []) |