summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/man/scons.13
-rw-r--r--src/CHANGES.txt4
-rw-r--r--src/engine/SCons/Platform/posix.xml3
-rw-r--r--src/engine/SCons/Tool/sunlink.py5
4 files changed, 13 insertions, 2 deletions
diff --git a/doc/man/scons.1 b/doc/man/scons.1
index 33c7a19..986c14b 100644
--- a/doc/man/scons.1
+++ b/doc/man/scons.1
@@ -6673,7 +6673,8 @@ construction variable.
.IP RPATH
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/CHANGES.txt b/src/CHANGES.txt
index 5513057..0fb6e71 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -378,6 +378,10 @@ RELEASE 0.97 - XXX
- Have the linkloc tool use $MSVS_VERSION to select the Microsoft
Visual Studio version to use.
+ From Karol Pietrzak:
+
+ - Add $RPATH (-R) support to the Sun linker Tool (sunlink).
+
From Kevin Quick:
- Fix the Builder name returned from ListBuilders and other instances
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