rpath $ORIGIN doc

This commit is contained in:
Michael Davidsaver
2019-06-24 10:35:25 -07:00
parent f5194b2274
commit 87d5ca1619
2 changed files with 11 additions and 3 deletions

View File

@@ -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()