SConstruct (3918:1f9a98d198e8) SConstruct (3940:b87f85bb4275)
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

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

204# noticeably longer.
205if False:
206 env.TargetSignatures('content')
207
208# M5_PLY is used by isa_parser.py to find the PLY package.
209env.Append(ENV = { 'M5_PLY' : Dir('ext/ply') })
210env['GCC'] = False
211env['SUNCC'] = False
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

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

204# noticeably longer.
205if False:
206 env.TargetSignatures('content')
207
208# M5_PLY is used by isa_parser.py to find the PLY package.
209env.Append(ENV = { 'M5_PLY' : Dir('ext/ply') })
210env['GCC'] = False
211env['SUNCC'] = False
212env['ICC'] = False
212env['GCC'] = subprocess.Popen(env['CXX'] + ' --version', shell=True,
213 stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
214 close_fds=True).communicate()[0].find('GCC') >= 0
215env['SUNCC'] = subprocess.Popen(env['CXX'] + ' -V', shell=True,
216 stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
217 close_fds=True).communicate()[0].find('Sun C++') >= 0
213env['GCC'] = subprocess.Popen(env['CXX'] + ' --version', shell=True,
214 stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
215 close_fds=True).communicate()[0].find('GCC') >= 0
216env['SUNCC'] = subprocess.Popen(env['CXX'] + ' -V', shell=True,
217 stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
218 close_fds=True).communicate()[0].find('Sun C++') >= 0
218if (env['GCC'] and env['SUNCC']):
219 print 'Error: How can we have both g++ and Sun C++ at the same time?'
219env['ICC'] = subprocess.Popen(env['CXX'] + ' -V', shell=True,
220 stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
221 close_fds=True).communicate()[0].find('Intel') >= 0
222if env['GCC'] + env['SUNCC'] env['ICC'] > 1:
223 print 'Error: How can we have two at the same time?'
220 Exit(1)
221
222
223# Set up default C++ compiler flags
224if env['GCC']:
225 env.Append(CCFLAGS='-pipe')
226 env.Append(CCFLAGS='-fno-strict-aliasing')
227 env.Append(CCFLAGS=Split('-Wall -Wno-sign-compare -Werror -Wundef'))
224 Exit(1)
225
226
227# Set up default C++ compiler flags
228if env['GCC']:
229 env.Append(CCFLAGS='-pipe')
230 env.Append(CCFLAGS='-fno-strict-aliasing')
231 env.Append(CCFLAGS=Split('-Wall -Wno-sign-compare -Werror -Wundef'))
232elif env['ICC']:
233 pass #Fix me... add warning flags once we clean up icc warnings
228elif env['SUNCC']:
229 env.Append(CCFLAGS='-Qoption ccfe')
230 env.Append(CCFLAGS='-features=gcc')
231 env.Append(CCFLAGS='-features=extensions')
232 env.Append(CCFLAGS='-library=stlport4')
233 env.Append(CCFLAGS='-xar')
234# env.Append(CCFLAGS='-instances=semiexplicit')
235else:
236 print 'Error: Don\'t know what compiler options to use for your compiler.'
234elif env['SUNCC']:
235 env.Append(CCFLAGS='-Qoption ccfe')
236 env.Append(CCFLAGS='-features=gcc')
237 env.Append(CCFLAGS='-features=extensions')
238 env.Append(CCFLAGS='-library=stlport4')
239 env.Append(CCFLAGS='-xar')
240# env.Append(CCFLAGS='-instances=semiexplicit')
241else:
242 print 'Error: Don\'t know what compiler options to use for your compiler.'
237 print ' Please fix SConstruct and try again.'
243 print ' Please fix SConstruct and src/SConscript and try again.'
238 Exit(1)
239
240if sys.platform == 'cygwin':
241 # cygwin has some header file issues...
242 env.Append(CCFLAGS=Split("-Wno-uninitialized"))
243env.Append(CPPPATH=[Dir('ext/dnet')])
244
245# Check for SWIG

--- 414 unchanged lines hidden ---
244 Exit(1)
245
246if sys.platform == 'cygwin':
247 # cygwin has some header file issues...
248 env.Append(CCFLAGS=Split("-Wno-uninitialized"))
249env.Append(CPPPATH=[Dir('ext/dnet')])
250
251# Check for SWIG

--- 414 unchanged lines hidden ---