SConstruct (9219:258753d3bc47) | SConstruct (9224:b0539d08bda8) |
---|---|
1# -*- mode:python -*- 2 3# Copyright (c) 2011 Advanced Micro Devices, Inc. 4# Copyright (c) 2009 The Hewlett-Packard Development Company 5# Copyright (c) 2004-2005 The Regents of The University of Michigan 6# All rights reserved. 7# 8# Redistribution and use in source and binary forms, with or without --- 488 unchanged lines hidden (view full) --- 497 # Note CCVERSION doesn't work here because it is run with the CC 498 # before we override it from the command line 499 gcc_version = readCommand([main['CXX'], '-dumpversion'], exception=False) 500 main['GCC_VERSION'] = gcc_version 501 if not compareVersions(gcc_version, '4.4.1') or \ 502 not compareVersions(gcc_version, '4.4.2'): 503 print 'Info: Tree vectorizer in GCC 4.4.1 & 4.4.2 is buggy, disabling.' 504 main.Append(CCFLAGS=['-fno-tree-vectorize']) | 1# -*- mode:python -*- 2 3# Copyright (c) 2011 Advanced Micro Devices, Inc. 4# Copyright (c) 2009 The Hewlett-Packard Development Company 5# Copyright (c) 2004-2005 The Regents of The University of Michigan 6# All rights reserved. 7# 8# Redistribution and use in source and binary forms, with or without --- 488 unchanged lines hidden (view full) --- 497 # Note CCVERSION doesn't work here because it is run with the CC 498 # before we override it from the command line 499 gcc_version = readCommand([main['CXX'], '-dumpversion'], exception=False) 500 main['GCC_VERSION'] = gcc_version 501 if not compareVersions(gcc_version, '4.4.1') or \ 502 not compareVersions(gcc_version, '4.4.2'): 503 print 'Info: Tree vectorizer in GCC 4.4.1 & 4.4.2 is buggy, disabling.' 504 main.Append(CCFLAGS=['-fno-tree-vectorize']) |
505 if compareVersions(gcc_version, '4.6') >= 0: | 505 # c++0x support in gcc is useful already from 4.4, see 506 # http://gcc.gnu.org/projects/cxx0x.html for details 507 if compareVersions(gcc_version, '4.4') >= 0: |
506 main.Append(CXXFLAGS=['-std=c++0x']) 507elif main['ICC']: 508 pass #Fix me... add warning flags once we clean up icc warnings 509elif main['SUNCC']: 510 main.Append(CCFLAGS=['-Qoption ccfe']) 511 main.Append(CCFLAGS=['-features=gcc']) 512 main.Append(CCFLAGS=['-features=extensions']) 513 main.Append(CCFLAGS=['-library=stlport4']) --- 16 unchanged lines hidden (view full) --- 530 main.Append(CCFLAGS=['-fno-strict-aliasing']) 531 main.Append(CCFLAGS=['-Wall', '-Wno-sign-compare', '-Wundef']) 532 main.Append(CCFLAGS=['-Wno-tautological-compare']) 533 main.Append(CCFLAGS=['-Wno-self-assign']) 534 # Ruby makes frequent use of extraneous parantheses in the printing 535 # of if-statements 536 main.Append(CCFLAGS=['-Wno-parentheses']) 537 | 508 main.Append(CXXFLAGS=['-std=c++0x']) 509elif main['ICC']: 510 pass #Fix me... add warning flags once we clean up icc warnings 511elif main['SUNCC']: 512 main.Append(CCFLAGS=['-Qoption ccfe']) 513 main.Append(CCFLAGS=['-features=gcc']) 514 main.Append(CCFLAGS=['-features=extensions']) 515 main.Append(CCFLAGS=['-library=stlport4']) --- 16 unchanged lines hidden (view full) --- 532 main.Append(CCFLAGS=['-fno-strict-aliasing']) 533 main.Append(CCFLAGS=['-Wall', '-Wno-sign-compare', '-Wundef']) 534 main.Append(CCFLAGS=['-Wno-tautological-compare']) 535 main.Append(CCFLAGS=['-Wno-self-assign']) 536 # Ruby makes frequent use of extraneous parantheses in the printing 537 # of if-statements 538 main.Append(CCFLAGS=['-Wno-parentheses']) 539 |
540 # clang 2.9 does not play well with c++0x as it ships with C++ 541 # headers that produce errors, this was fixed in 3.0 |
|
538 if compareVersions(clang_version, "3") >= 0: 539 main.Append(CXXFLAGS=['-std=c++0x']) 540else: 541 print termcap.Yellow + termcap.Bold + 'Error' + termcap.Normal, 542 print "Don't know what compiler options to use for your compiler." 543 print termcap.Yellow + ' compiler:' + termcap.Normal, main['CXX'] 544 print termcap.Yellow + ' version:' + termcap.Normal, 545 if not CXX_version: --- 529 unchanged lines hidden --- | 542 if compareVersions(clang_version, "3") >= 0: 543 main.Append(CXXFLAGS=['-std=c++0x']) 544else: 545 print termcap.Yellow + termcap.Bold + 'Error' + termcap.Normal, 546 print "Don't know what compiler options to use for your compiler." 547 print termcap.Yellow + ' compiler:' + termcap.Normal, main['CXX'] 548 print termcap.Yellow + ' version:' + termcap.Normal, 549 if not CXX_version: --- 529 unchanged lines hidden --- |