diff --git a/configure/CONFIG_SITE b/configure/CONFIG_SITE index 49f82c7a8..a39911783 100644 --- a/configure/CONFIG_SITE +++ b/configure/CONFIG_SITE @@ -172,7 +172,7 @@ GCC_PIPE = NO # Must be either YES, NO, or ORIGIN. If you set this to NO you must also provide a # way for Base executables to find their shared libraries when they are # run at build-time, e.g. set the LD_LIBRARY_PATH environment variable. -# ORIGIN is Linux specific. +# ORIGIN is a feature of the ELF executable format used by Linux, freebsd, and solaris. LINKER_USE_RPATH = YES # Only used when LINKER_USE_RPATH=ORIGIN diff --git a/src/tools/makeRPath.py b/src/tools/makeRPath.py index 5d151a41a..eeda8ab55 100644 --- a/src/tools/makeRPath.py +++ b/src/tools/makeRPath.py @@ -10,9 +10,17 @@ from argparse import ArgumentParser if os.environ.get('EPICS_DEBUG_RPATH','')=='YES': sys.stderr.write('%s'%sys.argv) -P = ArgumentParser() +P = ArgumentParser(description='''Compute and output -rpath entries for each of the given paths. + Paths under --root will be computed as relative to --final .''', +epilog=''' +eg. A library to be placed in /build/lib and linked against libraries in +'/build/lib', '/build/module/lib', and '/other/lib' would pass: + + "makeRPath.py -F /build/lib -R /build /build/lib /build/module/lib /other/lib" +which prints "-Wl,-rpath,$ORIGIN/. -Wl,-rpath,$ORIGIN/../module/lib -Wl,-rpath,/other/lib" +''') P.add_argument('-F','--final',default=os.getcwd(), help='Final install location for ELF file') -P.add_argument('-R','--root',default='/') +P.add_argument('-R','--root',default='/', help='Root of relocatable tree.') P.add_argument('-O', '--origin', default='$ORIGIN') P.add_argument('path', nargs='*') args = P.parse_args()