diff options
Diffstat (limited to 'scons/gallium.py')
-rw-r--r-- | scons/gallium.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scons/gallium.py b/scons/gallium.py index b69f2f2a75a..217478bd50d 100644 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -324,8 +324,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']: |