0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-01-31 21:22:27 +00:00
Jia Yuan Lo 7d59b4306f fix(main/tinygo): deduplicate DT_RUNPATH
Drop patchelf usage. Use ld.lld.sh wrapper to intercept multiple -rpath.
2023-07-07 13:02:09 +08:00

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