diff options
author | Jakob Bornecrantz <[email protected]> | 2009-06-14 16:56:34 +0200 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2009-06-14 16:56:34 +0200 |
commit | 2fe65e8f149e961afb8ccd9b1e57c5c7e96ecfd6 (patch) | |
tree | 4eecf639463b6fa8b25d9e838e692c6b34a22b43 /scons/gallium.py | |
parent | 6791576f6cc90018bd65c263fa6c16ad2b19cdae (diff) | |
parent | b799af91d5ffbee1481161fec29eb4c92b161272 (diff) |
Merge branch 'mesa_7_5_branch'
Diffstat (limited to 'scons/gallium.py')
-rw-r--r-- | scons/gallium.py | 11 |
1 files changed, 9 insertions, 2 deletions
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 = []) |