Deleted Added
sdiff udiff text old ( 9552:460cf901acba ) new ( 9556:463684ff6fd1 )
full compact
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

--- 501 unchanged lines hidden (view full) ---

510
511main['GCC'] = CXX_version and CXX_version.find('g++') >= 0
512main['CLANG'] = CXX_version and CXX_version.find('clang') >= 0
513if main['GCC'] + main['CLANG'] > 1:
514 print 'Error: How can we have two at the same time?'
515 Exit(1)
516
517# Set up default C++ compiler flags
518if main['GCC']:
519 # Check for a supported version of gcc, >= 4.4 is needed for c++0x
520 # support. See http://gcc.gnu.org/projects/cxx0x.html for details
521 gcc_version = readCommand([main['CXX'], '-dumpversion'], exception=False)
522 if compareVersions(gcc_version, "4.4") < 0:
523 print 'Error: gcc version 4.4 or newer required.'
524 print ' Installed version:', gcc_version
525 Exit(1)
526
527 main['GCC_VERSION'] = gcc_version
528 main.Append(CCFLAGS=['-pipe'])
529 main.Append(CCFLAGS=['-fno-strict-aliasing'])
530 main.Append(CCFLAGS=['-Wall', '-Wno-sign-compare', '-Wundef'])
531 main.Append(CXXFLAGS=['-Wmissing-field-initializers',
532 '-Woverloaded-virtual'])
533 main.Append(CXXFLAGS=['-std=c++0x'])
534
535 # Check for versions with bugs
536 if not compareVersions(gcc_version, '4.4.1') or \
537 not compareVersions(gcc_version, '4.4.2'):
538 print 'Info: Tree vectorizer in GCC 4.4.1 & 4.4.2 is buggy, disabling.'
539 main.Append(CCFLAGS=['-fno-tree-vectorize'])
540
541 # LTO support is only really working properly from 4.6 and beyond

--- 24 unchanged lines hidden (view full) ---

566 if compareVersions(clang_version, "2.9") < 0:
567 print 'Error: clang version 2.9 or newer required.'
568 print ' Installed version:', clang_version
569 Exit(1)
570 else:
571 print 'Error: Unable to determine clang version.'
572 Exit(1)
573
574 main.Append(CCFLAGS=['-pipe'])
575 main.Append(CCFLAGS=['-fno-strict-aliasing'])
576 main.Append(CCFLAGS=['-Wall', '-Wno-sign-compare', '-Wundef'])
577 main.Append(CCFLAGS=['-Wno-tautological-compare'])
578 main.Append(CCFLAGS=['-Wno-self-assign'])
579 # Ruby makes frequent use of extraneous parantheses in the printing
580 # of if-statements
581 main.Append(CCFLAGS=['-Wno-parentheses'])
582 main.Append(CXXFLAGS=['-Wmissing-field-initializers',
583 '-Woverloaded-virtual'])
584 main.Append(CXXFLAGS=['-std=c++0x'])
585 # On Mac OS X/Darwin we need to also use libc++ (part of XCode) as
586 # opposed to libstdc++ to make the transition from TR1 to
587 # C++11. See http://libcxx.llvm.org. However, clang has chosen a
588 # strict implementation of the C++11 standard, and does not allow
589 # incomplete types in template arguments (besides unique_ptr and
590 # shared_ptr), and the libc++ STL containers create problems in
591 # combination with the current gem5 code. For now, we stick with
592 # libstdc++ and use the TR1 namespace.

--- 597 unchanged lines hidden ---