From: stevenknight Date: Mon, 2 Aug 2004 12:11:48 +0000 (+0000) Subject: Add support on IRIX. (Chad Austin) X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8445402bbe0f0a00e6ccb7a07f48c70ecc50f341;p=scons.git Add support on IRIX. (Chad Austin) git-svn-id: http://scons.tigris.org/svn/scons/trunk@1021 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/doc/man/scons.1 b/doc/man/scons.1 index 135e5f72..557db2c1 100644 --- a/doc/man/scons.1 +++ b/doc/man/scons.1 @@ -5658,8 +5658,9 @@ General options passed to the Java RMI stub compiler. .IP RPATH A list of paths to search for shared libraries when running programs. -Currently only used in the GNU linker. Ignored on platforms and -toolchains that don't support it. Note that the paths added to RPATH +Currently only used in the GNU linker (gnulink) and IRIX linker (sgilink). +Ignored on platforms and toolchains that don't support it. +Note that the paths added to RPATH are not transformed by .B scons in any way: if you want an absolute diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 083d6401..6550064f 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -28,7 +28,8 @@ RELEASE 0.96 - XXX From Chad Austin and Christoph Wiedemann: - Add support for a $RPATH variable to supply a list of directories - to search for shared libraries when linking a program. + to search for shared libraries when linking a program. Used by + the GNU and IRIX linkers (gnulink and sgilink). From Charles Crain: diff --git a/src/engine/SCons/Tool/sgilink.py b/src/engine/SCons/Tool/sgilink.py index 80cfcf44..85d9e306 100644 --- a/src/engine/SCons/Tool/sgilink.py +++ b/src/engine/SCons/Tool/sgilink.py @@ -46,5 +46,12 @@ def generate(env): env['LINK'] = env.Detect(linkers) or 'cc' env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -shared') + # __RPATH is set to $_RPATH in the platform specification if that + # platform supports it. + env.Append(LINKFLAGS=['$__RPATH']) + env['RPATHPREFIX'] = '-rpath ' + env['RPATHSUFFIX'] = '' + env['_RPATH'] = '${_concat(RPATHPREFIX, RPATH, RPATHSUFFIX, __env__)}' + def exists(env): return env.Detect(linkers)