SConstruct (12222:6db0fc7407a5) SConstruct (12230:48021d6b51eb)
1# -*- mode:python -*-
2
1# -*- mode:python -*-
2
3# Copyright (c) 2013, 2015, 2016 ARM Limited
3# Copyright (c) 2013, 2015-2017 ARM Limited
4# All rights reserved.
5#
6# The license below extends only to copyright in the software and shall
7# not be construed as granting a license to any other intellectual
8# property including but not limited to intellectual property relating
9# to a hardware implementation of the functionality of the software
10# licensed hereunder. You may use the software subject to the license
11# terms below provided that you ensure that this notice is replicated

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

1129 print "Can't find library for POSIX clocks."
1130
1131# Check for <fenv.h> (C99 FP environment control)
1132have_fenv = conf.CheckHeader('fenv.h', '<>')
1133if not have_fenv:
1134 print "Warning: Header file <fenv.h> not found."
1135 print " This host has no IEEE FP rounding mode control."
1136
4# All rights reserved.
5#
6# The license below extends only to copyright in the software and shall
7# not be construed as granting a license to any other intellectual
8# property including but not limited to intellectual property relating
9# to a hardware implementation of the functionality of the software
10# licensed hereunder. You may use the software subject to the license
11# terms below provided that you ensure that this notice is replicated

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

1129 print "Can't find library for POSIX clocks."
1130
1131# Check for <fenv.h> (C99 FP environment control)
1132have_fenv = conf.CheckHeader('fenv.h', '<>')
1133if not have_fenv:
1134 print "Warning: Header file <fenv.h> not found."
1135 print " This host has no IEEE FP rounding mode control."
1136
1137# Check for <png.h> (libpng library needed if wanting to dump
1138# frame buffer image in png format)
1139have_png = conf.CheckHeader('png.h', '<>')
1140if not have_png:
1141 print "Warning: Header file <png.h> not found."
1142 print " This host has no libpng library."
1143 print " Disabling support for PNG framebuffers."
1144
1137# Check if we should enable KVM-based hardware virtualization. The API
1138# we rely on exists since version 2.6.36 of the kernel, but somehow
1139# the KVM_API_VERSION does not reflect the change. We test for one of
1140# the types as a fall back.
1141have_kvm = conf.CheckHeader('linux/kvm.h', '<>')
1142if not have_kvm:
1143 print "Info: Compatible header file <linux/kvm.h> not found, " \
1144 "disabling KVM support."

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

1273 BoolVariable('SS_COMPATIBLE_FP',
1274 'Make floating-point results compatible with SimpleScalar',
1275 False),
1276 BoolVariable('USE_SSE2',
1277 'Compile for SSE2 (-msse2) to get IEEE FP on x86 hosts',
1278 False),
1279 BoolVariable('USE_POSIX_CLOCK', 'Use POSIX Clocks', have_posix_clock),
1280 BoolVariable('USE_FENV', 'Use <fenv.h> IEEE mode control', have_fenv),
1145# Check if we should enable KVM-based hardware virtualization. The API
1146# we rely on exists since version 2.6.36 of the kernel, but somehow
1147# the KVM_API_VERSION does not reflect the change. We test for one of
1148# the types as a fall back.
1149have_kvm = conf.CheckHeader('linux/kvm.h', '<>')
1150if not have_kvm:
1151 print "Info: Compatible header file <linux/kvm.h> not found, " \
1152 "disabling KVM support."

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

1281 BoolVariable('SS_COMPATIBLE_FP',
1282 'Make floating-point results compatible with SimpleScalar',
1283 False),
1284 BoolVariable('USE_SSE2',
1285 'Compile for SSE2 (-msse2) to get IEEE FP on x86 hosts',
1286 False),
1287 BoolVariable('USE_POSIX_CLOCK', 'Use POSIX Clocks', have_posix_clock),
1288 BoolVariable('USE_FENV', 'Use <fenv.h> IEEE mode control', have_fenv),
1281 BoolVariable('CP_ANNOTATE', 'Enable critical path annotation capability', False),
1282 BoolVariable('USE_KVM', 'Enable hardware virtualized (KVM) CPU models', have_kvm),
1289 BoolVariable('USE_PNG', 'Enable support for PNG images', have_png),
1290 BoolVariable('CP_ANNOTATE', 'Enable critical path annotation capability',
1291 False),
1292 BoolVariable('USE_KVM', 'Enable hardware virtualized (KVM) CPU models',
1293 have_kvm),
1283 BoolVariable('USE_TUNTAP',
1284 'Enable using a tap device to bridge to the host network',
1285 have_tuntap),
1286 BoolVariable('BUILD_GPU', 'Build the compute-GPU model', False),
1287 EnumVariable('PROTOCOL', 'Coherence protocol for Ruby', 'None',
1288 all_protocols),
1289 EnumVariable('BACKTRACE_IMPL', 'Post-mortem dump implementation',
1290 backtrace_impls[-1], backtrace_impls)
1291 )
1292
1293# These variables get exported to #defines in config/*.hh (see src/SConscript).
1294export_vars += ['USE_FENV', 'SS_COMPATIBLE_FP', 'TARGET_ISA', 'TARGET_GPU_ISA',
1295 'CP_ANNOTATE', 'USE_POSIX_CLOCK', 'USE_KVM', 'USE_TUNTAP',
1294 BoolVariable('USE_TUNTAP',
1295 'Enable using a tap device to bridge to the host network',
1296 have_tuntap),
1297 BoolVariable('BUILD_GPU', 'Build the compute-GPU model', False),
1298 EnumVariable('PROTOCOL', 'Coherence protocol for Ruby', 'None',
1299 all_protocols),
1300 EnumVariable('BACKTRACE_IMPL', 'Post-mortem dump implementation',
1301 backtrace_impls[-1], backtrace_impls)
1302 )
1303
1304# These variables get exported to #defines in config/*.hh (see src/SConscript).
1305export_vars += ['USE_FENV', 'SS_COMPATIBLE_FP', 'TARGET_ISA', 'TARGET_GPU_ISA',
1306 'CP_ANNOTATE', 'USE_POSIX_CLOCK', 'USE_KVM', 'USE_TUNTAP',
1296 'PROTOCOL', 'HAVE_PROTOBUF', 'HAVE_PERF_ATTR_EXCLUDE_HOST']
1307 'PROTOCOL', 'HAVE_PROTOBUF', 'HAVE_PERF_ATTR_EXCLUDE_HOST',
1308 'USE_PNG']
1297
1298###################################################
1299#
1300# Define a SCons builder for configuration flag headers.
1301#
1302###################################################
1303
1304# This function generates a config header file that #defines the

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

1481 print "Warning: <fenv.h> not available; " \
1482 "forcing USE_FENV to False in", variant_dir + "."
1483 env['USE_FENV'] = False
1484
1485 if not env['USE_FENV']:
1486 print "Warning: No IEEE FP rounding mode control in", variant_dir + "."
1487 print " FP results may deviate slightly from other platforms."
1488
1309
1310###################################################
1311#
1312# Define a SCons builder for configuration flag headers.
1313#
1314###################################################
1315
1316# This function generates a config header file that #defines the

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

1493 print "Warning: <fenv.h> not available; " \
1494 "forcing USE_FENV to False in", variant_dir + "."
1495 env['USE_FENV'] = False
1496
1497 if not env['USE_FENV']:
1498 print "Warning: No IEEE FP rounding mode control in", variant_dir + "."
1499 print " FP results may deviate slightly from other platforms."
1500
1501 if not have_png and env['USE_PNG']:
1502 print "Warning: <png.h> not available; " \
1503 "forcing USE_PNG to False in", variant_dir + "."
1504 env['USE_PNG'] = False
1505
1506 if env['USE_PNG']:
1507 env.Append(LIBS=['png'])
1508
1489 if env['EFENCE']:
1490 env.Append(LIBS=['efence'])
1491
1492 if env['USE_KVM']:
1493 if not have_kvm:
1494 print "Warning: Can not enable KVM, host seems to lack KVM support"
1495 env['USE_KVM'] = False
1496 elif not is_isa_kvm_compatible(env['TARGET_ISA']):

--- 42 unchanged lines hidden ---
1509 if env['EFENCE']:
1510 env.Append(LIBS=['efence'])
1511
1512 if env['USE_KVM']:
1513 if not have_kvm:
1514 print "Warning: Can not enable KVM, host seems to lack KVM support"
1515 env['USE_KVM'] = False
1516 elif not is_isa_kvm_compatible(env['TARGET_ISA']):

--- 42 unchanged lines hidden ---