summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2009-04-21 17:17:15 -0700
committerNathan Binkert <nate@binkert.org>2009-04-21 17:17:15 -0700
commit56e5509bfd4e670c032ccff4c7d68dbe7493eadd (patch)
tree86f6cad462524fedc0c9d85e591834d8d46b59d3 /SConstruct
parent4d001e43da6da2972172c352153e745238860021 (diff)
downloadgem5-56e5509bfd4e670c032ccff4c7d68dbe7493eadd.tar.xz
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 (limited to 'SConstruct')
-rw-r--r--SConstruct8
1 files changed, 4 insertions, 4 deletions
diff --git a/SConstruct b/SConstruct
index cc5bbbdd9..85b5a8ca0 100644
--- a/SConstruct
+++ b/SConstruct
@@ -557,13 +557,15 @@ py_lib_path = [ py_getvar('LIBDIR') ]
# 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 @@ if not conf.CheckHeader('Python.h', '<>'):
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)