Skip to content

Commit 236523f

Browse files
authored
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.
1 parent b1cf46c commit 236523f

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
@@ -1196,12 +1196,12 @@ else ifeq ($(OS), Darwin)
11961196
RPATH := -Wl,-rpath,'@executable_path/$(build_libdir_rel)'
11971197
RPATH_ORIGIN := -Wl,-rpath,'@loader_path/'
11981198
RPATH_ESCAPED_ORIGIN := $(RPATH_ORIGIN)
1199-
RPATH_LIB := -Wl,-rpath,'@loader_path/julia/' -Wl,-rpath,'@loader_path/'
1199+
RPATH_LIB := -Wl,-rpath,'@loader_path/'
12001200
else
1201-
RPATH := -Wl,-rpath,'$$ORIGIN/$(build_libdir_rel)' -Wl,-rpath,'$$ORIGIN/$(build_private_libdir_rel)' -Wl,-rpath-link,$(build_shlibdir) -Wl,-z,origin
1201+
RPATH := -Wl,-rpath,'$$ORIGIN/$(build_libdir_rel)' -Wl,-rpath-link,$(build_shlibdir) -Wl,-z,origin
12021202
RPATH_ORIGIN := -Wl,-rpath,'$$ORIGIN' -Wl,-z,origin
12031203
RPATH_ESCAPED_ORIGIN := -Wl,-rpath,'\$$\$$ORIGIN' -Wl,-z,origin -Wl,-rpath-link,$(build_shlibdir)
1204-
RPATH_LIB := -Wl,-rpath,'$$ORIGIN/julia' -Wl,-rpath,'$$ORIGIN' -Wl,-z,origin
1204+
RPATH_LIB := -Wl,-rpath,'$$ORIGIN/' -Wl,-z,origin
12051205
endif
12061206

12071207
# --whole-archive

0 commit comments

Comments
 (0)