diff options
author | Steven Knight <knight@baldmt.com> | 2004-04-03 07:16:45 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-04-03 07:16:45 (GMT) |
commit | fd66a638d425a722b4e84b57d7a40860d06c9d49 (patch) | |
tree | 5a9734b8a725f4eaf5a6fc9c9e72b96755c49768 /src/engine/SCons | |
parent | ba82e696b7132d668f3f2f981a16147b9cca8992 (diff) | |
download | SCons-fd66a638d425a722b4e84b57d7a40860d06c9d49.zip SCons-fd66a638d425a722b4e84b57d7a40860d06c9d49.tar.gz SCons-fd66a638d425a722b4e84b57d7a40860d06c9d49.tar.bz2 |
Add RPATH support. (Chad Austin)
Diffstat (limited to 'src/engine/SCons')
-rw-r--r-- | src/engine/SCons/Platform/posix.py | 3 | ||||
-rw-r--r-- | src/engine/SCons/Tool/gnulink.py | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/engine/SCons/Platform/posix.py b/src/engine/SCons/Platform/posix.py index bc121e6..f64d272 100644 --- a/src/engine/SCons/Platform/posix.py +++ b/src/engine/SCons/Platform/posix.py @@ -229,3 +229,6 @@ def generate(env): env['SPAWN'] = spawn env['SHELL'] = 'sh' env['ESCAPE'] = escape + + # This platform supports RPATH specifications. + env['__RPATH'] = '$_RPATH' diff --git a/src/engine/SCons/Tool/gnulink.py b/src/engine/SCons/Tool/gnulink.py index 0e75304..b900202 100644 --- a/src/engine/SCons/Tool/gnulink.py +++ b/src/engine/SCons/Tool/gnulink.py @@ -45,6 +45,13 @@ def generate(env): if env['PLATFORM'] == 'hpux': env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -shared -fPIC') + + # __RPATH is set to $_RPATH in the platform specification if that + # platform supports it. + env.Append(LINKFLAGS=['$__RPATH']) + env['RPATHPREFIX'] = '-Wl,--rpath=' + env['RPATHSUFFIX'] = '' + env['_RPATH'] = '${_concat(RPATHPREFIX, RPATH, RPATHSUFFIX, __env__)}' def exists(env): return env.Detect(linkers) |