From 2a9eaa0aa4a046bb2dfd4c2aeb1ebbdcff0770b9 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Sat, 7 Mar 2020 01:45:07 -0500 Subject: Refactor RPATH creation: * Decreased complexity * Most rpath_* functions accept a FSTree structure now * Fewer calls to chdir() overall * Deeply nested libraries are detected * Libraries are no longer confined to lib/ and /lib64 --- src/relocation.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/relocation.c') diff --git a/src/relocation.c b/src/relocation.c index 2ef72eb..c235abe 100644 --- a/src/relocation.c +++ b/src/relocation.c @@ -387,6 +387,7 @@ void relocate_root(const char *destroot, const char *baseroot) { getcwd(cwd, sizeof(cwd)); chdir(baseroot); { + FSTree *libs = rpath_libraries_available("."); // Rewrite binary prefixes b_record = prefixes_read(SPM_META_PREFIX_BIN); if (b_record) { @@ -395,7 +396,7 @@ void relocate_root(const char *destroot, const char *baseroot) { if (SPM_GLOBAL.verbose) { printf("Relocate RPATH: %s\n", b_record[i]->path); } - rpath_autoset(b_record[i]->path); + rpath_autoset(b_record[i]->path, libs); } if (SPM_GLOBAL.verbose) { printf("Relocate DATA : %s\n", b_record[i]->path); -- cgit