Add RPATH (-R) support to the sun linker. (Karol Pietrzak)
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sat, 7 May 2005 20:56:44 +0000 (20:56 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sat, 7 May 2005 20:56:44 +0000 (20:56 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@1288 fdb21ef1-2011-0410-befe-b5e4ea1792b1

doc/man/scons.1
src/CHANGES.txt
src/engine/SCons/Platform/posix.xml
src/engine/SCons/Tool/sunlink.py

index 33c7a191296fbc39ffd4434207a1fb743b82b7a2..986c14be0a8fb2838add02f38c22c0855c77137c 100644 (file)
@@ -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
index 5513057d6a682d6da58809716ab9d263b8ca1b94..0fb6e7123cce499b63eb30f98c83184c917d52c8 100644 (file)
@@ -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
index 1a53c7227dc0e8bee30b01ba9e32a1476ab74188..cb05e528497f27457590b6e71b6710ff7735a55e 100644 (file)
@@ -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
index 476755994cc65732debf30cfc13a0e10b9ee8429..66dd7c0f1f5939eeb342ceb6458046fb86ba1212 100644 (file)
@@ -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