diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-04-06 10:19:36 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-04-06 10:19:36 -0700 |
commit | d080581db1f9ee4e1e6d07d2b01c13c67908a391 (patch) | |
tree | cc484b289fa5a30c4631f9faa1d8b456bffeebfc /ext/libelf/SConscript | |
parent | 7a7c4c5fca83a8d47c7e71c9c080a882ebe204a9 (diff) | |
parent | 639cb0a42d953ee32bc7e96b0cdfa96cd40e9fc1 (diff) | |
download | gem5-d080581db1f9ee4e1e6d07d2b01c13c67908a391.tar.xz |
Merge ARM into the head. ARM will compile but may not actually work.
Diffstat (limited to 'ext/libelf/SConscript')
-rw-r--r-- | ext/libelf/SConscript | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/libelf/SConscript b/ext/libelf/SConscript index 3d35b0c07..5e3038317 100644 --- a/ext/libelf/SConscript +++ b/ext/libelf/SConscript @@ -87,16 +87,13 @@ ElfFile('libelf_convert.c') ElfFile('libelf_fsize.c') ElfFile('libelf_msize.c') -m4env = Environment(ENV=os.environ) - -if env.get('CC'): - m4env['CC'] = env['CC'] -if env.get('CXX'): - m4env['CXX'] = env['CXX'] - -if env.get('OSX64bit'): - m4env.Append(CFLAGS='-arch x86_64') - m4env.Append(LINKFLAGS='-arch x86_64') +m4env = env.Clone() +if env['GCC']: + major,minor,dot = [ int(x) for x in env['CXXVERSION'].split('.')] + if major >= 4: + m4env.Append(CCFLAGS=['-Wno-pointer-sign']) +m4env.Append(CCFLAGS=['-Wno-implicit']) +del m4env['CPPPATH'] # If we have gm4 use it if m4env.Detect('gm4'): @@ -117,7 +114,10 @@ m4env.M4(target=File('libelf_fsize.c'), source=[File('elf_types.m4'), File('libelf_fsize.m4')]) m4env.M4(target=File('libelf_msize.c'), source=[File('elf_types.m4'), File('libelf_msize.m4')]) -m4env.Library('elf', elf_files) + +# Build libelf as a static library with PIC code so it can be linked +# into either m5 or the library +m4env.Library('elf', [m4env.SharedObject(f) for f in elf_files]) env.Append(CPPPATH=Dir('.')) env.Append(LIBS=['elf']) |