summaryrefslogtreecommitdiffstats
path: root/scons
diff options
context:
space:
mode:
Diffstat (limited to 'scons')
-rw-r--r--scons/dxsdk.py8
-rw-r--r--scons/gallium.py11
2 files changed, 12 insertions, 7 deletions
diff --git a/scons/dxsdk.py b/scons/dxsdk.py
index a369e1da10c..de090e4f991 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 aed813f0279..7be0a250040 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 = [])