Skip to content

Commit

Permalink
liefldd: Linux RPATH fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mingwandroid committed Nov 26, 2018
1 parent c932763 commit 35e8e19
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions conda_build/os_utils/liefldd.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,14 @@ def get_rpaths(file, exe_dirname, envroot, windows_root=''):
# elif binary.format == lief.EXE_FORMATS.MACHO and binary.has_rpath:
# rpaths = binary.rpath.path.split(':')
elif binary.format == lief.EXE_FORMATS.MACHO and binary.has_rpath:
rpaths = [command.path.rstrip('/') for command in binary.commands
if command.command == lief.MachO.LOAD_COMMAND_TYPES.RPATH]
rpaths.extend([command.path.rstrip('/') for command in binary.commands
if command.command == lief.MachO.LOAD_COMMAND_TYPES.RPATH])
elif binary.format == lief.EXE_FORMATS.ELF:
if binary.type == lief.ELF.ELF_CLASS.CLASS32 or binary.type == lief.ELF.ELF_CLASS.CLASS64:
dynamic_entries = binary.dynamic_entries
rpaths.extend([e.rpath for e in dynamic_entries if e.tag == lief.ELF.DYNAMIC_TAGS.RPATH])
rpaths_colons = [e.rpath for e in dynamic_entries if e.tag == lief.ELF.DYNAMIC_TAGS.RPATH]
for rpaths_colon in rpaths_colons:
rpaths.extend(rpaths_colon.split(':'))
return [from_os_varnames(binary, rpath) for rpath in rpaths]


Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
This file is run explicitly by test_build_recipes, in the test_checkout_tool_as_dependency function.
This file is run explicitly by test_recipe_builds, in the test_checkout_tool_as_dependency function.

0 comments on commit 35e8e19

Please sign in to comment.