SConstruct (8268:3f49ed206f46) SConstruct (8297:d57afdcf38f5)
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

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

705# Check for <fenv.h> (C99 FP environment control)
706have_fenv = conf.CheckHeader('fenv.h', '<>')
707if not have_fenv:
708 print "Warning: Header file <fenv.h> not found."
709 print " This host has no IEEE FP rounding mode control."
710
711######################################################################
712#
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

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

705# Check for <fenv.h> (C99 FP environment control)
706have_fenv = conf.CheckHeader('fenv.h', '<>')
707if not have_fenv:
708 print "Warning: Header file <fenv.h> not found."
709 print " This host has no IEEE FP rounding mode control."
710
711######################################################################
712#
713# Check for mysql.
714#
715mysql_config = WhereIs('mysql_config')
716have_mysql = bool(mysql_config)
717
718# Check MySQL version.
719if have_mysql:
720 mysql_version = readCommand(mysql_config + ' --version')
721 min_mysql_version = '4.1'
722 if compareVersions(mysql_version, min_mysql_version) < 0:
723 print 'Warning: MySQL', min_mysql_version, 'or newer required.'
724 print ' Version', mysql_version, 'detected.'
725 have_mysql = False
726
727# Set up mysql_config commands.
728if have_mysql:
729 mysql_config_include = mysql_config + ' --include'
730 if os.system(mysql_config_include + ' > /dev/null') != 0:
731 # older mysql_config versions don't support --include, use
732 # --cflags instead
733 mysql_config_include = mysql_config + ' --cflags | sed s/\\\'//g'
734 # This seems to work in all versions
735 mysql_config_libs = mysql_config + ' --libs'
736
737######################################################################
738#
739# Finish the configuration
740#
741main = conf.Finish()
742
743######################################################################
744#
745# Collect all non-global variables
746#

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

815 BoolVariable('EFENCE', 'Link with Electric Fence malloc debugger',
816 False),
817 BoolVariable('SS_COMPATIBLE_FP',
818 'Make floating-point results compatible with SimpleScalar',
819 False),
820 BoolVariable('USE_SSE2',
821 'Compile for SSE2 (-msse2) to get IEEE FP on x86 hosts',
822 False),
713# Finish the configuration
714#
715main = conf.Finish()
716
717######################################################################
718#
719# Collect all non-global variables
720#

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

789 BoolVariable('EFENCE', 'Link with Electric Fence malloc debugger',
790 False),
791 BoolVariable('SS_COMPATIBLE_FP',
792 'Make floating-point results compatible with SimpleScalar',
793 False),
794 BoolVariable('USE_SSE2',
795 'Compile for SSE2 (-msse2) to get IEEE FP on x86 hosts',
796 False),
823 BoolVariable('USE_MYSQL', 'Use MySQL for stats output', have_mysql),
824 BoolVariable('USE_POSIX_CLOCK', 'Use POSIX Clocks', have_posix_clock),
825 BoolVariable('USE_FENV', 'Use <fenv.h> IEEE mode control', have_fenv),
826 BoolVariable('USE_CHECKER', 'Use checker for detailed CPU models', False),
827 BoolVariable('CP_ANNOTATE', 'Enable critical path annotation capability', False),
828 BoolVariable('RUBY', 'Build with Ruby', False),
829 )
830
831# These variables get exported to #defines in config/*.hh (see src/SConscript).
797 BoolVariable('USE_POSIX_CLOCK', 'Use POSIX Clocks', have_posix_clock),
798 BoolVariable('USE_FENV', 'Use <fenv.h> IEEE mode control', have_fenv),
799 BoolVariable('USE_CHECKER', 'Use checker for detailed CPU models', False),
800 BoolVariable('CP_ANNOTATE', 'Enable critical path annotation capability', False),
801 BoolVariable('RUBY', 'Build with Ruby', False),
802 )
803
804# These variables get exported to #defines in config/*.hh (see src/SConscript).
832export_vars += ['FULL_SYSTEM', 'USE_FENV', 'USE_MYSQL',
805export_vars += ['FULL_SYSTEM', 'USE_FENV',
833 'NO_FAST_ALLOC', 'FORCE_FAST_ALLOC', 'FAST_ALLOC_STATS',
834 'SS_COMPATIBLE_FP', 'USE_CHECKER', 'TARGET_ISA', 'CP_ANNOTATE',
835 'USE_POSIX_CLOCK' ]
836
837###################################################
838#
839# Define a SCons builder for configuration flag headers.
840#

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

989
990 if not env['USE_FENV']:
991 print "Warning: No IEEE FP rounding mode control in", variant_dir + "."
992 print " FP results may deviate slightly from other platforms."
993
994 if env['EFENCE']:
995 env.Append(LIBS=['efence'])
996
806 'NO_FAST_ALLOC', 'FORCE_FAST_ALLOC', 'FAST_ALLOC_STATS',
807 'SS_COMPATIBLE_FP', 'USE_CHECKER', 'TARGET_ISA', 'CP_ANNOTATE',
808 'USE_POSIX_CLOCK' ]
809
810###################################################
811#
812# Define a SCons builder for configuration flag headers.
813#

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

962
963 if not env['USE_FENV']:
964 print "Warning: No IEEE FP rounding mode control in", variant_dir + "."
965 print " FP results may deviate slightly from other platforms."
966
967 if env['EFENCE']:
968 env.Append(LIBS=['efence'])
969
997 if env['USE_MYSQL']:
998 if not have_mysql:
999 print "Warning: MySQL not available; " \
1000 "forcing USE_MYSQL to False in", variant_dir + "."
1001 env['USE_MYSQL'] = False
1002 else:
1003 print "Compiling in", variant_dir, "with MySQL support."
1004 env.ParseConfig(mysql_config_libs)
1005 env.ParseConfig(mysql_config_include)
1006
1007 # Save sticky variable settings back to current variables file
1008 sticky_vars.Save(current_vars_file, env)
1009
1010 if env['USE_SSE2']:
1011 env.Append(CCFLAGS=['-msse2'])
1012
1013 # The src/SConscript file sets up the build rules in 'env' according
1014 # to the configured variables. It returns a list of environments,

--- 22 unchanged lines hidden ---
970 # Save sticky variable settings back to current variables file
971 sticky_vars.Save(current_vars_file, env)
972
973 if env['USE_SSE2']:
974 env.Append(CCFLAGS=['-msse2'])
975
976 # The src/SConscript file sets up the build rules in 'env' according
977 # to the configured variables. It returns a list of environments,

--- 22 unchanged lines hidden ---