summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2005-05-07 20:56:44 (GMT)
committerSteven Knight <knight@baldmt.com>2005-05-07 20:56:44 (GMT)
commita59b059a27956e18ce2e686b09c19a643d6d8fef (patch)
tree55a418235504c72c949bf14a706f2bd1edb49ae2 /src/engine
parent859846789db273c0013c30dd86c802c59639fce6 (diff)
downloadSCons-a59b059a27956e18ce2e686b09c19a643d6d8fef.zip
SCons-a59b059a27956e18ce2e686b09c19a643d6d8fef.tar.gz
SCons-a59b059a27956e18ce2e686b09c19a643d6d8fef.tar.bz2
Add RPATH (-R) support to the sun linker. (Karol Pietrzak)
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/SCons/Platform/posix.xml3
-rw-r--r--src/engine/SCons/Tool/sunlink.py5
2 files changed, 7 insertions, 1 deletions
diff --git a/src/engine/SCons/Platform/posix.xml b/src/engine/SCons/Platform/posix.xml
index 1a53c72..cb05e52 100644
--- a/src/engine/SCons/Platform/posix.xml
+++ b/src/engine/SCons/Platform/posix.xml
@@ -2,7 +2,8 @@
<cvar name="RPATH">
<summary>
A list of paths to search for shared libraries when running programs.
-Currently only used in the GNU linker (gnulink) and IRIX linker (sgilink).
+Currently only used in the GNU (gnulink),
+IRIX (sgilink) and Sun (sunlink) linkers.
Ignored on platforms and toolchains that don't support it.
Note that the paths added to RPATH
are not transformed by
diff --git a/src/engine/SCons/Tool/sunlink.py b/src/engine/SCons/Tool/sunlink.py
index 4767559..66dd7c0 100644
--- a/src/engine/SCons/Tool/sunlink.py
+++ b/src/engine/SCons/Tool/sunlink.py
@@ -60,5 +60,10 @@ def generate(env):
env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -G')
+ env.Append(LINKFLAGS=['$__RPATH'])
+ env['RPATHPREFIX'] = '-R'
+ env['RPATHSUFFIX'] = ''
+ env['_RPATH'] = '${_concat(RPATHPREFIX, RPATH, RPATHSUFFIX, __env__)}'
+
def exists(env):
return ccLinker