Deleted Added
sdiff udiff text old ( 9255:60f043573a65 ) new ( 9396:0c0ec9d87746 )
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

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

175termcap = get_termcap(GetOption('use_colors'))
176
177########################################################################
178#
179# Set up the main build environment.
180#
181########################################################################
182use_vars = set([ 'AS', 'AR', 'CC', 'CXX', 'HOME', 'LD_LIBRARY_PATH',
183 'LIBRARY_PATH', 'PATH', 'PYTHONPATH', 'RANLIB', 'SWIG' ])
184
185use_env = {}
186for key,val in os.environ.iteritems():
187 if key in use_vars or key.startswith("M5"):
188 use_env[key] = val
189
190main = Environment(ENV=use_env)
191main.Decider('MD5-timestamp')

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

358global_vars_file = joinpath(build_root, 'variables.global')
359
360global_vars = Variables(global_vars_file, args=ARGUMENTS)
361
362global_vars.AddVariables(
363 ('CC', 'C compiler', environ.get('CC', main['CC'])),
364 ('CXX', 'C++ compiler', environ.get('CXX', main['CXX'])),
365 ('SWIG', 'SWIG tool', environ.get('SWIG', main['SWIG'])),
366 ('BATCH', 'Use batch pool for build and tests', False),
367 ('BATCH_CMD', 'Batch pool submission command name', 'qdo'),
368 ('M5_BUILD_CACHE', 'Cache built objects in this directory', False),
369 ('EXTRAS', 'Add extra directories to the compilation', '')
370 )
371
372# Update main environment with values from ARGUMENTS & global_vars_file
373global_vars.Update(main)

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

608 main['AS'] = main['BATCH_CMD'] + ' ' + main['AS']
609 main['AR'] = main['BATCH_CMD'] + ' ' + main['AR']
610 main['RANLIB'] = main['BATCH_CMD'] + ' ' + main['RANLIB']
611
612if sys.platform == 'cygwin':
613 # cygwin has some header file issues...
614 main.Append(CCFLAGS=["-Wno-uninitialized"])
615
616# Check for SWIG
617if not main.has_key('SWIG'):
618 print 'Error: SWIG utility not found.'
619 print ' Please install (see http://www.swig.org) and retry.'
620 Exit(1)
621
622# Check for appropriate SWIG version
623swig_version = readCommand([main['SWIG'], '-version'], exception='').split()

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

809# Check for zlib. If the check passes, libz will be automatically
810# added to the LIBS environment variable.
811if not conf.CheckLibWithHeader('z', 'zlib.h', 'C++','zlibVersion();'):
812 print 'Error: did not find needed zlib compression library '\
813 'and/or zlib.h header file.'
814 print ' Please install zlib and try again.'
815 Exit(1)
816
817# Check for librt.
818have_posix_clock = \
819 conf.CheckLibWithHeader(None, 'time.h', 'C',
820 'clock_nanosleep(0,0,NULL,NULL);') or \
821 conf.CheckLibWithHeader('rt', 'time.h', 'C',
822 'clock_nanosleep(0,0,NULL,NULL);')
823
824if conf.CheckLib('tcmalloc_minimal'):

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

935 BoolVariable('CP_ANNOTATE', 'Enable critical path annotation capability', False),
936 EnumVariable('PROTOCOL', 'Coherence protocol for Ruby', 'None',
937 all_protocols),
938 )
939
940# These variables get exported to #defines in config/*.hh (see src/SConscript).
941export_vars += ['USE_FENV', 'SS_COMPATIBLE_FP',
942 'TARGET_ISA', 'CP_ANNOTATE', 'USE_POSIX_CLOCK', 'PROTOCOL',
943 'HAVE_STATIC_ASSERT']
944
945###################################################
946#
947# Define a SCons builder for configuration flag headers.
948#
949###################################################
950
951# This function generates a config header file that #defines the

--- 181 unchanged lines hidden ---