summaryrefslogtreecommitdiff
path: root/scons/gallium.py
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2009-06-14 16:56:34 +0200
committerJakob Bornecrantz <jakob@vmware.com>2009-06-14 16:56:34 +0200
commit2fe65e8f149e961afb8ccd9b1e57c5c7e96ecfd6 (patch)
tree4eecf639463b6fa8b25d9e838e692c6b34a22b43 /scons/gallium.py
parent6791576f6cc90018bd65c263fa6c16ad2b19cdae (diff)
parentb799af91d5ffbee1481161fec29eb4c92b161272 (diff)
Merge branch 'mesa_7_5_branch'
Diffstat (limited to 'scons/gallium.py')
-rw-r--r--scons/gallium.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/scons/gallium.py b/scons/gallium.py
index aed813f027..7be0a25004 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 = [])