changeset 4dcea6c903fa in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=4dcea6c903fa
description:
scons: Fix two problems with the way that the library path is generated.
1) -L is automatically added, so don't do it ourselves
2) prepend the paths for gzstream and libelf so they are certain to
come first. The problem is that python might add /usr/lib to the path
and the user might have a locally installed version of libelf installed.
diffstat:
3 files changed, 8 insertions(+), 8 deletions(-)
SConstruct | 8 ++++----
ext/gzstream/SConscript | 4 ++--
ext/libelf/SConscript | 4 ++--
diffs (56 lines):
diff -r aeb2cf497240 -r 4dcea6c903fa SConstruct
--- a/SConstruct Tue Apr 21 16:04:55 2009 -0700
+++ b/SConstruct Tue Apr 21 17:17:15 2009 -0700
@@ -557,13 +557,15 @@
# add the prefix/lib/pythonX.Y/config dir, but only if there is no
# shared library in prefix/lib/.
if not py_getvar('Py_ENABLE_SHARED'):
- py_lib_path.append('-L' + py_getvar('LIBPL'))
+ py_lib_path.append(py_getvar('LIBPL'))
py_libs = []
for lib in py_getvar('LIBS').split() + py_getvar('SYSLIBS').split():
+ assert lib.startswith('-l')
+ lib = lib[2:]
if lib not in py_libs:
py_libs.append(lib)
-py_libs.append('-l' + py_version)
+py_libs.append(py_version)
env.Append(CPPPATH=py_includes)
env.Append(LIBPATH=py_lib_path)
@@ -574,8 +576,6 @@
Exit(1)
for lib in py_libs:
- assert lib.startswith('-l')
- lib = lib[2:]
if not conf.CheckLib(lib):
print "Error: can't find library %s required by python" % lib
Exit(1)
diff -r aeb2cf497240 -r 4dcea6c903fa ext/gzstream/SConscript
--- a/ext/gzstream/SConscript Tue Apr 21 16:04:55 2009 -0700
+++ b/ext/gzstream/SConscript Tue Apr 21 17:17:15 2009 -0700
@@ -32,7 +32,7 @@
env.Library('gzstream', [File('gzstream.cc')])
-env.Append(CPPPATH=Dir('.'))
+env.Prepend(CPPPATH=Dir('.'))
env.Append(LIBS=['gzstream'])
-env.Append(LIBPATH=[Dir('.')])
+env.Prepend(LIBPATH=[Dir('.')])
diff -r aeb2cf497240 -r 4dcea6c903fa ext/libelf/SConscript
--- a/ext/libelf/SConscript Tue Apr 21 16:04:55 2009 -0700
+++ b/ext/libelf/SConscript Tue Apr 21 17:17:15 2009 -0700
@@ -119,7 +119,7 @@
# into either m5 or the library
m4env.Library('elf', [m4env.SharedObject(f) for f in elf_files])
-env.Append(CPPPATH=Dir('.'))
+env.Prepend(CPPPATH=Dir('.'))
env.Append(LIBS=['elf'])
-env.Append(LIBPATH=[Dir('.')])
+env.Prepend(LIBPATH=[Dir('.')])
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev