mirror of
https://github.com/termux/termux-packages.git
synced 2025-01-31 21:22:27 +00:00
7d59b4306f
Drop patchelf usage. Use ld.lld.sh wrapper to intercept multiple -rpath.
20 lines
311 B
Python
20 lines
311 B
Python
#!/usr/bin/python3
|
|
import sys
|
|
|
|
if len(sys.argv) < 2:
|
|
sys.exit()
|
|
|
|
rpath = sys.argv[1]
|
|
ld_lld_argv = sys.argv[2:]
|
|
|
|
count = 0
|
|
while rpath in ld_lld_argv:
|
|
ld_lld_argv.remove(rpath)
|
|
count = count + 1
|
|
|
|
if count > 0:
|
|
ld_lld_argv.append(rpath)
|
|
|
|
if len(ld_lld_argv) > 0:
|
|
print(" ".join(ld_lld_argv))
|