Skip to content

Commit f8ae06f

Browse files
staticfloatKristofferC
authored andcommitted
Cleanup RPATH settings (#42919)
Previously, we needed to provide both `usr/lib` and `usr/lib/julia` as elements on the `RPATH`, because `libjulia` lived in `usr/lib`, and needed to be able to find dependent libraries both within a build tree (when most libraries live in `usr/lib`) and within an install tree (when most libraries live in `usr/lib/julia`). Nowadays, everything is either in `usr/lib` or in `usr/lib/julia` with the exception of `libjulia`, but since it's really `libjulia-internal` that does all the `dlopen()`'ing, we can simply use `$$ORIGIN` (or the equivalent `@loader_path/` on macOS) and completely ignore the rest of the RPATH shenanigans we do. (cherry picked from commit 236523f)
1 parent 242d851 commit f8ae06f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Make.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,12 +1233,12 @@ else ifeq ($(OS), Darwin)
12331233
RPATH := -Wl,-rpath,'@executable_path/$(build_libdir_rel)'
12341234
RPATH_ORIGIN := -Wl,-rpath,'@loader_path/'
12351235
RPATH_ESCAPED_ORIGIN := $(RPATH_ORIGIN)
1236-
RPATH_LIB := -Wl,-rpath,'@loader_path/julia/' -Wl,-rpath,'@loader_path/'
1236+
RPATH_LIB := -Wl,-rpath,'@loader_path/'
12371237
else
1238-
RPATH := -Wl,-rpath,'$$ORIGIN/$(build_libdir_rel)' -Wl,-rpath,'$$ORIGIN/$(build_private_libdir_rel)' -Wl,-rpath-link,$(build_shlibdir) -Wl,-z,origin
1238+
RPATH := -Wl,-rpath,'$$ORIGIN/$(build_libdir_rel)' -Wl,-rpath-link,$(build_shlibdir) -Wl,-z,origin
12391239
RPATH_ORIGIN := -Wl,-rpath,'$$ORIGIN' -Wl,-z,origin
12401240
RPATH_ESCAPED_ORIGIN := -Wl,-rpath,'\$$\$$ORIGIN' -Wl,-z,origin -Wl,-rpath-link,$(build_shlibdir)
1241-
RPATH_LIB := -Wl,-rpath,'$$ORIGIN/julia' -Wl,-rpath,'$$ORIGIN' -Wl,-z,origin
1241+
RPATH_LIB := -Wl,-rpath,'$$ORIGIN/' -Wl,-z,origin
12421242
endif
12431243

12441244
# --whole-archive

0 commit comments

Comments
 (0)