SConscript.sc revision 12563:8d59ed22ae79
17110Sgblack@eecs.umich.edu# Copyright (c) 2017, TU Dresden 210037SARM gem5 Developers# Copyright (c) 2017, University of Kaiserslautern 37110Sgblack@eecs.umich.edu# All rights reserved. 47110Sgblack@eecs.umich.edu 57110Sgblack@eecs.umich.edu# Permission is hereby granted, free of charge, to any person obtaining a copy 67110Sgblack@eecs.umich.edu# of this software and associated documentation files (the "Software"), to deal 77110Sgblack@eecs.umich.edu# in the Software without restriction, including without limitation the rights 87110Sgblack@eecs.umich.edu# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 97110Sgblack@eecs.umich.edu# copies of the Software, and to permit persons to whom the Software is 107110Sgblack@eecs.umich.edu# furnished to do so, subject to the following conditions: 117110Sgblack@eecs.umich.edu# 127110Sgblack@eecs.umich.edu# The above copyright notice and this permission notice shall be included in 137110Sgblack@eecs.umich.edu# all copies or substantial portions of the Software. 147110Sgblack@eecs.umich.edu# 156253Sgblack@eecs.umich.edu# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 166253Sgblack@eecs.umich.edu# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 176253Sgblack@eecs.umich.edu# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 186253Sgblack@eecs.umich.edu# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 196253Sgblack@eecs.umich.edu# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 206253Sgblack@eecs.umich.edu# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 216253Sgblack@eecs.umich.edu# SOFTWARE. 226253Sgblack@eecs.umich.edu# 236253Sgblack@eecs.umich.edu# Authors: Christian Menard 246253Sgblack@eecs.umich.edu# Matthias Jung 256253Sgblack@eecs.umich.edu 266253Sgblack@eecs.umich.edufrom __future__ import print_function 276253Sgblack@eecs.umich.edu 286253Sgblack@eecs.umich.eduimport os 296253Sgblack@eecs.umich.edu 306253Sgblack@eecs.umich.eduImport('systemc', 'SystemCSource') 316253Sgblack@eecs.umich.edu 326253Sgblack@eecs.umich.eduif systemc['COROUTINE_LIB'] == 'qt': 336253Sgblack@eecs.umich.edu SystemCSource('qt.c') 346253Sgblack@eecs.umich.edu 356253Sgblack@eecs.umich.edu qt_arch = systemc.get('QT_ARCH', None) 366253Sgblack@eecs.umich.edu if not qt_arch: 376253Sgblack@eecs.umich.edu print('No architecture selected for the QT coroutine library.') 386253Sgblack@eecs.umich.edu Exit(1) 396253Sgblack@eecs.umich.edu 406253Sgblack@eecs.umich.edu if qt_arch in ('i386', 'iX86_64'): 416253Sgblack@eecs.umich.edu SystemCSource(os.path.join('md', qt_arch + '.s')) 426253Sgblack@eecs.umich.edu else: 436253Sgblack@eecs.umich.edu print('Don\'t know what to do for QT arch %s.' % qt_arch) 446253Sgblack@eecs.umich.edu Exit(1) 456253Sgblack@eecs.umich.edu