SConscript (6120:4dcea6c903fa) SConscript (6121:18aff7f548c1)
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

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

25# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28#
29# Authors: Nathan Binkert
30
31import os, subprocess
32
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

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

25# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28#
29# Authors: Nathan Binkert
30
31import os, subprocess
32
33Import('env')
33Import('main')
34
35elf_files = []
36def ElfFile(filename):
37 elf_files.append(File(filename))
38
39ElfFile('elf_begin.c')
40ElfFile('elf_cntl.c')
41ElfFile('elf_data.c')

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

82ElfFile('libelf_phdr.c')
83ElfFile('libelf_shdr.c')
84ElfFile('libelf_xlate.c')
85
86ElfFile('libelf_convert.c')
87ElfFile('libelf_fsize.c')
88ElfFile('libelf_msize.c')
89
34
35elf_files = []
36def ElfFile(filename):
37 elf_files.append(File(filename))
38
39ElfFile('elf_begin.c')
40ElfFile('elf_cntl.c')
41ElfFile('elf_data.c')

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

82ElfFile('libelf_phdr.c')
83ElfFile('libelf_shdr.c')
84ElfFile('libelf_xlate.c')
85
86ElfFile('libelf_convert.c')
87ElfFile('libelf_fsize.c')
88ElfFile('libelf_msize.c')
89
90m4env = env.Clone()
91if env['GCC']:
92 major,minor,dot = [ int(x) for x in env['CXXVERSION'].split('.')]
90m4env = main.Clone()
91if m4env['GCC']:
92 major,minor,dot = [ int(x) for x in m4env['CXXVERSION'].split('.')]
93 if major >= 4:
94 m4env.Append(CCFLAGS=['-Wno-pointer-sign'])
95m4env.Append(CCFLAGS=['-Wno-implicit'])
96del m4env['CPPPATH']
97
98# If we have gm4 use it
99if m4env.Detect('gm4'):
100 m4env['M4'] = 'gm4'

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

114 source=[File('elf_types.m4'), File('libelf_fsize.m4')])
115m4env.M4(target=File('libelf_msize.c'),
116 source=[File('elf_types.m4'), File('libelf_msize.m4')])
117
118# Build libelf as a static library with PIC code so it can be linked
119# into either m5 or the library
120m4env.Library('elf', [m4env.SharedObject(f) for f in elf_files])
121
93 if major >= 4:
94 m4env.Append(CCFLAGS=['-Wno-pointer-sign'])
95m4env.Append(CCFLAGS=['-Wno-implicit'])
96del m4env['CPPPATH']
97
98# If we have gm4 use it
99if m4env.Detect('gm4'):
100 m4env['M4'] = 'gm4'

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

114 source=[File('elf_types.m4'), File('libelf_fsize.m4')])
115m4env.M4(target=File('libelf_msize.c'),
116 source=[File('elf_types.m4'), File('libelf_msize.m4')])
117
118# Build libelf as a static library with PIC code so it can be linked
119# into either m5 or the library
120m4env.Library('elf', [m4env.SharedObject(f) for f in elf_files])
121
122env.Prepend(CPPPATH=Dir('.'))
123env.Append(LIBS=['elf'])
124env.Prepend(LIBPATH=[Dir('.')])
122main.Prepend(CPPPATH=Dir('.'))
123main.Append(LIBS=['elf'])
124main.Prepend(LIBPATH=[Dir('.')])
125
125