SConscript (8945:5de232ed3a28) | SConscript (8946:fb6c89334b86) |
---|---|
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 --- 777 unchanged lines hidden (view full) --- 786 sym = pysource.symname 787 788 code = code_formatter() 789 code('''\ 790#include "sim/init.hh" 791 792namespace { 793 | 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 --- 777 unchanged lines hidden (view full) --- 786 sym = pysource.symname 787 788 code = code_formatter() 789 code('''\ 790#include "sim/init.hh" 791 792namespace { 793 |
794const char data_${sym}[] = { | 794const uint8_t data_${sym}[] = { |
795''') 796 code.indent() 797 step = 16 798 for i in xrange(0, len(data), step): 799 x = array.array('B', data[i:i+step]) 800 code(''.join('%d,' % d for d in x)) 801 code.dedent() 802 --- 44 unchanged lines hidden (view full) --- 847 848 swig_env = new_env.Clone() 849 swig_env.Append(CCFLAGS='-Werror') 850 if env['GCC']: 851 swig_env.Append(CCFLAGS='-Wno-uninitialized') 852 swig_env.Append(CCFLAGS='-Wno-sign-compare') 853 swig_env.Append(CCFLAGS='-Wno-parentheses') 854 swig_env.Append(CCFLAGS='-Wno-unused-label') | 795''') 796 code.indent() 797 step = 16 798 for i in xrange(0, len(data), step): 799 x = array.array('B', data[i:i+step]) 800 code(''.join('%d,' % d for d in x)) 801 code.dedent() 802 --- 44 unchanged lines hidden (view full) --- 847 848 swig_env = new_env.Clone() 849 swig_env.Append(CCFLAGS='-Werror') 850 if env['GCC']: 851 swig_env.Append(CCFLAGS='-Wno-uninitialized') 852 swig_env.Append(CCFLAGS='-Wno-sign-compare') 853 swig_env.Append(CCFLAGS='-Wno-parentheses') 854 swig_env.Append(CCFLAGS='-Wno-unused-label') |
855 if compareVersions(env['GCC_VERSION'], '4.6.0') != -1: | 855 if compareVersions(env['GCC_VERSION'], '4.6') >= 0: |
856 swig_env.Append(CCFLAGS='-Wno-unused-but-set-variable') 857 if env['CLANG']: 858 swig_env.Append(CCFLAGS=['-Wno-unused-label']) 859 860 861 werror_env = new_env.Clone() 862 werror_env.Append(CCFLAGS='-Werror') 863 --- 62 unchanged lines hidden (view full) --- 926 new_env.Command(secondary_exename, exename, 927 MakeAction('ln $SOURCE $TARGET', Transform("HARDLINK"))) 928 929 new_env.M5Binary = targets[0] 930 envList.append(new_env) 931 932# Debug binary 933ccflags = {} | 856 swig_env.Append(CCFLAGS='-Wno-unused-but-set-variable') 857 if env['CLANG']: 858 swig_env.Append(CCFLAGS=['-Wno-unused-label']) 859 860 861 werror_env = new_env.Clone() 862 werror_env.Append(CCFLAGS='-Werror') 863 --- 62 unchanged lines hidden (view full) --- 926 new_env.Command(secondary_exename, exename, 927 MakeAction('ln $SOURCE $TARGET', Transform("HARDLINK"))) 928 929 new_env.M5Binary = targets[0] 930 envList.append(new_env) 931 932# Debug binary 933ccflags = {} |
934if env['GCC'] or env['CLANG']: | 934if env['GCC']: |
935 if sys.platform == 'sunos5': 936 ccflags['debug'] = '-gstabs+' 937 else: 938 ccflags['debug'] = '-ggdb3' 939 ccflags['opt'] = '-g -O3' 940 ccflags['fast'] = '-O3' 941 ccflags['prof'] = '-O3 -g -pg' 942elif env['SUNCC']: 943 ccflags['debug'] = '-g0' 944 ccflags['opt'] = '-g -O' 945 ccflags['fast'] = '-fast' 946 ccflags['prof'] = '-fast -g -pg' 947elif env['ICC']: 948 ccflags['debug'] = '-g -O0' 949 ccflags['opt'] = '-g -O' 950 ccflags['fast'] = '-fast' 951 ccflags['prof'] = '-fast -g -pg' | 935 if sys.platform == 'sunos5': 936 ccflags['debug'] = '-gstabs+' 937 else: 938 ccflags['debug'] = '-ggdb3' 939 ccflags['opt'] = '-g -O3' 940 ccflags['fast'] = '-O3' 941 ccflags['prof'] = '-O3 -g -pg' 942elif env['SUNCC']: 943 ccflags['debug'] = '-g0' 944 ccflags['opt'] = '-g -O' 945 ccflags['fast'] = '-fast' 946 ccflags['prof'] = '-fast -g -pg' 947elif env['ICC']: 948 ccflags['debug'] = '-g -O0' 949 ccflags['opt'] = '-g -O' 950 ccflags['fast'] = '-fast' 951 ccflags['prof'] = '-fast -g -pg' |
952elif env['CLANG']: 953 ccflags['debug'] = '-g -O0' 954 ccflags['opt'] = '-g -O3' 955 ccflags['fast'] = '-O3' 956 ccflags['prof'] = '-O3 -g -pg' |
|
952else: 953 print 'Unknown compiler, please fix compiler options' 954 Exit(1) 955 956 957# To speed things up, we only instantiate the build environments we 958# need. We try to identify the needed environment for each target; if 959# we can't, we fall back on instantiating all the environments just to --- 45 unchanged lines hidden --- | 957else: 958 print 'Unknown compiler, please fix compiler options' 959 Exit(1) 960 961 962# To speed things up, we only instantiate the build environments we 963# need. We try to identify the needed environment for each target; if 964# we can't, we fall back on instantiating all the environments just to --- 45 unchanged lines hidden --- |