summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-09-24 03:34:30 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-09-24 03:34:30 -0400
commite6d7f3b2a9a0c01f89013626e2725729b263ea8f (patch)
treef6da69562b14b0ddbad796a4a318193b8cddf769 /SConstruct
parent6de68a0844baec3deb7d30dbe8df42f06c958d65 (diff)
downloadgpsd-e6d7f3b2a9a0c01f89013626e2725729b263ea8f.tar.gz
A bit of backstop in case chrpath is not present.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct10
1 files changed, 8 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct
index e4d860ef..b631d95f 100644
--- a/SConstruct
+++ b/SConstruct
@@ -157,8 +157,14 @@ for (name, default, help) in pathopts:
# work. Importing PKG_CONFIG_PATH can be used to solve a problem with where .pc
# files go in a cross-build, and importing STAGING_PREFIX is required for the
# OpenWRT build.
-
-envs = {}
+#
+# If chrpath(1) is not available, the RPATH of built binaries won't be
+# set so they can see shared libraries in this build directory. Setting
+# LD_LIBRARY_PATH like this partially solves this problem, ensuring that
+# at least for tests run under scons the local libraries will be found
+# anyway.
+#
+envs = {'LD_LIBRARY_PATH': os.getcwd()}
for var in ('PATH', 'PKG_CONFIG_PATH', 'STAGING_PREFIX'):
if var in os.environ:
envs[var] = os.environ[var]