From bee4d454e84c12e96e7b929e5a9abefa2ae6746a Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Mon, 7 Apr 2008 23:40:24 -0400 Subject: SCons: Make BATCH options global sticky so libelf is built appropriately. --HG-- extra : convert_revision : 4bca5c31b8421305d41aac072696964b39d7ff16 --- ext/libelf/SConscript | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'ext/libelf/SConscript') diff --git a/ext/libelf/SConscript b/ext/libelf/SConscript index 3d35b0c07..3db526c13 100644 --- a/ext/libelf/SConscript +++ b/ext/libelf/SConscript @@ -87,16 +87,9 @@ 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.Copy() +del m4env['CCFLAGS'] +del m4env['CPPPATH'] # If we have gm4 use it if m4env.Detect('gm4'): -- cgit v1.2.3 From a589eb4053d9a902f9e9047830955963aec94e64 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Thu, 9 Oct 2008 04:58:23 -0700 Subject: SCons: add code to provide a libm5 shared library. Targets look like libm5_debug.so. This target can be dynamically linked into another C++ program and provide just about all of the M5 features. Additionally, this library is a standalone module that can be imported into python with an "import libm5_debug" type command line. --- ext/libelf/SConscript | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ext/libelf/SConscript') diff --git a/ext/libelf/SConscript b/ext/libelf/SConscript index 3db526c13..ab85308de 100644 --- a/ext/libelf/SConscript +++ b/ext/libelf/SConscript @@ -110,7 +110,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']) -- cgit v1.2.3 From f4bceb9760c93d3b5ff3c2606f7e460b42724670 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Tue, 28 Oct 2008 21:13:21 -0400 Subject: Libelf: Append options to CCFLAGS for warning free libelf compile instead of deleting CCFLAGS. Should fix 64bit OS X compile problem. --- ext/libelf/SConscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/libelf/SConscript') diff --git a/ext/libelf/SConscript b/ext/libelf/SConscript index ab85308de..d266d20a9 100644 --- a/ext/libelf/SConscript +++ b/ext/libelf/SConscript @@ -88,7 +88,7 @@ ElfFile('libelf_fsize.c') ElfFile('libelf_msize.c') m4env = env.Copy() -del m4env['CCFLAGS'] +m4env.Append(CCFLAGS=['-Wno-pointer-sign', '-Wno-implicit']) del m4env['CPPPATH'] # If we have gm4 use it -- cgit v1.2.3 From c55ae0cf5dcff2c0be98ff0e9ec971c6744beb35 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Sat, 6 Dec 2008 14:18:18 -0800 Subject: scons: only use -Wno-pointer-sign with gcc >= 4.3 --- ext/libelf/SConscript | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ext/libelf/SConscript') diff --git a/ext/libelf/SConscript b/ext/libelf/SConscript index d266d20a9..18d1100a4 100644 --- a/ext/libelf/SConscript +++ b/ext/libelf/SConscript @@ -88,7 +88,11 @@ ElfFile('libelf_fsize.c') ElfFile('libelf_msize.c') m4env = env.Copy() -m4env.Append(CCFLAGS=['-Wno-pointer-sign', '-Wno-implicit']) +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 -- cgit v1.2.3 From dd6ea8797fdfbe00331a17ab3ffade10bbcbde1f Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Mon, 9 Feb 2009 20:10:14 -0800 Subject: scons: Require SCons version 0.98.1 This allows me to clean things up so we are up to date with respect to deprecated features. There are many features scheduled for permanent failure in scons 2.0 and 0.98.1 provides the most compatability for that. It also paves the way for some nice new features that I will add soon --- ext/libelf/SConscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/libelf/SConscript') diff --git a/ext/libelf/SConscript b/ext/libelf/SConscript index 18d1100a4..5e3038317 100644 --- a/ext/libelf/SConscript +++ b/ext/libelf/SConscript @@ -87,7 +87,7 @@ ElfFile('libelf_convert.c') ElfFile('libelf_fsize.c') ElfFile('libelf_msize.c') -m4env = env.Copy() +m4env = env.Clone() if env['GCC']: major,minor,dot = [ int(x) for x in env['CXXVERSION'].split('.')] if major >= 4: -- cgit v1.2.3