SConscript (8607:5fb918115c07) SConscript (8614:2fc7787f47a9)
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

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

46
47Import('*')
48
49# Children need to see the environment
50Export('env')
51
52build_env = [(opt, env[opt]) for opt in export_vars]
53
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

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

46
47Import('*')
48
49# Children need to see the environment
50Export('env')
51
52build_env = [(opt, env[opt]) for opt in export_vars]
53
54from m5.util import code_formatter
54from m5.util import code_formatter, compareVersions
55
56########################################################################
57# Code for adding source files of various types
58#
59# When specifying a source file of some type, a set of guards can be
60# specified for that file. When get() is used to find the files, if
61# get specifies a set of filters, only files that match those filters
62# will be accepted (unspecified filters on files are assumed to be

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

846 new_env.Append(**kwargs)
847
848 swig_env = new_env.Clone()
849 swig_env.Append(CCFLAGS='-Werror')
850 if env['GCC']:
851 swig_env.Append(CCFLAGS='-Wno-uninitialized')
852 swig_env.Append(CCFLAGS='-Wno-sign-compare')
853 swig_env.Append(CCFLAGS='-Wno-parentheses')
55
56########################################################################
57# Code for adding source files of various types
58#
59# When specifying a source file of some type, a set of guards can be
60# specified for that file. When get() is used to find the files, if
61# get specifies a set of filters, only files that match those filters
62# will be accepted (unspecified filters on files are assumed to be

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

846 new_env.Append(**kwargs)
847
848 swig_env = new_env.Clone()
849 swig_env.Append(CCFLAGS='-Werror')
850 if env['GCC']:
851 swig_env.Append(CCFLAGS='-Wno-uninitialized')
852 swig_env.Append(CCFLAGS='-Wno-sign-compare')
853 swig_env.Append(CCFLAGS='-Wno-parentheses')
854 swig_env.Append(CCFLAGS='-Wno-unused-label')
855 swig_env.Append(CCFLAGS='-Wno-unused-but-set-variable')
854 if compareVersions(env['GCC_VERSION'], '4.6.0') != -1:
855 swig_env.Append(CCFLAGS='-Wno-unused-label')
856 swig_env.Append(CCFLAGS='-Wno-unused-but-set-variable')
856
857 werror_env = new_env.Clone()
858 werror_env.Append(CCFLAGS='-Werror')
859
860 def make_obj(source, static, extra_deps = None):
861 '''This function adds the specified source to the correct
862 build environment, and returns the corresponding SCons Object
863 nodes'''

--- 109 unchanged lines hidden ---
857
858 werror_env = new_env.Clone()
859 werror_env.Append(CCFLAGS='-Werror')
860
861 def make_obj(source, static, extra_deps = None):
862 '''This function adds the specified source to the correct
863 build environment, and returns the corresponding SCons Object
864 nodes'''

--- 109 unchanged lines hidden ---