scons: Work around for old versions of scons mistaking strings for sequences.

This commit is contained in:
Gabe Black 2010-11-09 11:03:40 -08:00
parent 2fd9dc19cd
commit 14b27fc302
2 changed files with 17 additions and 17 deletions

View file

@ -358,10 +358,10 @@ if main['GCC'] + main['SUNCC'] + main['ICC'] > 1:
# Set up default C++ compiler flags # Set up default C++ compiler flags
if main['GCC']: if main['GCC']:
main.Append(CCFLAGS='-pipe') main.Append(CCFLAGS=['-pipe'])
main.Append(CCFLAGS='-fno-strict-aliasing') main.Append(CCFLAGS=['-fno-strict-aliasing'])
main.Append(CCFLAGS=['-Wall', '-Wno-sign-compare', '-Wundef']) main.Append(CCFLAGS=['-Wall', '-Wno-sign-compare', '-Wundef'])
main.Append(CXXFLAGS='-Wno-deprecated') main.Append(CXXFLAGS=['-Wno-deprecated'])
# Read the GCC version to check for versions with bugs # Read the GCC version to check for versions with bugs
# Note CCVERSION doesn't work here because it is run with the CC # Note CCVERSION doesn't work here because it is run with the CC
# before we override it from the command line # before we override it from the command line
@ -369,16 +369,16 @@ if main['GCC']:
if not compareVersions(gcc_version, '4.4.1') or \ if not compareVersions(gcc_version, '4.4.1') or \
not compareVersions(gcc_version, '4.4.2'): not compareVersions(gcc_version, '4.4.2'):
print 'Info: Tree vectorizer in GCC 4.4.1 & 4.4.2 is buggy, disabling.' print 'Info: Tree vectorizer in GCC 4.4.1 & 4.4.2 is buggy, disabling.'
main.Append(CCFLAGS='-fno-tree-vectorize') main.Append(CCFLAGS=['-fno-tree-vectorize'])
elif main['ICC']: elif main['ICC']:
pass #Fix me... add warning flags once we clean up icc warnings pass #Fix me... add warning flags once we clean up icc warnings
elif main['SUNCC']: elif main['SUNCC']:
main.Append(CCFLAGS='-Qoption ccfe') main.Append(CCFLAGS=['-Qoption ccfe'])
main.Append(CCFLAGS='-features=gcc') main.Append(CCFLAGS=['-features=gcc'])
main.Append(CCFLAGS='-features=extensions') main.Append(CCFLAGS=['-features=extensions'])
main.Append(CCFLAGS='-library=stlport4') main.Append(CCFLAGS=['-library=stlport4'])
main.Append(CCFLAGS='-xar') main.Append(CCFLAGS=['-xar'])
#main.Append(CCFLAGS='-instances=semiexplicit') #main.Append(CCFLAGS=['-instances=semiexplicit'])
else: else:
print 'Error: Don\'t know what compiler options to use for your compiler.' print 'Error: Don\'t know what compiler options to use for your compiler.'
print ' Please fix SConstruct and src/SConscript and try again.' print ' Please fix SConstruct and src/SConscript and try again.'
@ -399,7 +399,7 @@ if main['BATCH']:
if sys.platform == 'cygwin': if sys.platform == 'cygwin':
# cygwin has some header file issues... # cygwin has some header file issues...
main.Append(CCFLAGS="-Wno-uninitialized") main.Append(CCFLAGS=["-Wno-uninitialized"])
# Check for SWIG # Check for SWIG
if not main.has_key('SWIG'): if not main.has_key('SWIG'):
@ -489,10 +489,10 @@ try:
uname = platform.uname() uname = platform.uname()
if uname[0] == 'Darwin' and compareVersions(uname[2], '9.0.0') >= 0: if uname[0] == 'Darwin' and compareVersions(uname[2], '9.0.0') >= 0:
if int(readCommand('sysctl -n hw.cpu64bit_capable')[0]): if int(readCommand('sysctl -n hw.cpu64bit_capable')[0]):
main.Append(CCFLAGS='-arch x86_64') main.Append(CCFLAGS=['-arch x86_64'])
main.Append(CFLAGS='-arch x86_64') main.Append(CFLAGS=['-arch x86_64'])
main.Append(LINKFLAGS='-arch x86_64') main.Append(LINKFLAGS=['-arch x86_64'])
main.Append(ASFLAGS='-arch x86_64') main.Append(ASFLAGS=['-arch x86_64'])
except: except:
pass pass
@ -887,7 +887,7 @@ for variant_path in variant_paths:
sticky_vars.Save(current_vars_file, env) sticky_vars.Save(current_vars_file, env)
if env['USE_SSE2']: if env['USE_SSE2']:
env.Append(CCFLAGS='-msse2') env.Append(CCFLAGS=['-msse2'])
# The src/SConscript file sets up the build rules in 'env' according # The src/SConscript file sets up the build rules in 'env' according
# to the configured variables. It returns a list of environments, # to the configured variables. It returns a list of environments,

View file

@ -106,7 +106,7 @@ if not SCons.Tool.m4.exists(m4env):
"Please install M4 and try again." "Please install M4 and try again."
Exit(1) Exit(1)
m4env.Append(M4FLAGS='-DSRCDIR=%s' % Dir('.').path) m4env.Append(M4FLAGS=['-DSRCDIR=%s' % Dir('.').path])
m4env['M4COM'] = '$M4 $M4FLAGS $SOURCES > $TARGET' m4env['M4COM'] = '$M4 $M4FLAGS $SOURCES > $TARGET'
m4env.M4(target=File('libelf_convert.c'), m4env.M4(target=File('libelf_convert.c'),
source=[File('elf_types.m4'), File('libelf_convert.m4')]) source=[File('elf_types.m4'), File('libelf_convert.m4')])