Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix executable and more library RPATHs on FreeBSD (JuliaLang#27627)
First of all, we need to add libgfortran, libgcc_s, and libquadmath to `JL_PRIVATE_LIBS-0` instead of `JL_LIBS`. This ensures that they get installed into `lib/julia`, where our dependencies are supposed to live, instead of `lib`, where only libjulia should live. Now we need to call `fixup-rpath.sh` on more directories. Currently we're only calling it on `lib`, but we also need to call it on `lib/julia` and even on `bin`, because FreeBSD seems to load libraries based on the executable's RPATH rather than libjulia's RPATH. AND, speaking of the executable's RPATH, we need to make sure we have `lib/julia` in there; currently we only have `lib`. So in an isolated environment outside of the build directory, Julia won't be able to load any of its dependencies, which is bad. This is accomplished with a simple adjustment in `Make.inc`. To make sure that our dependencies can find each other properly, we need to add `RPATH_ESCAPED_ORIGIN` to `LDFLAGS` in `CONFIGURE_COMMON`. That way, every dependency that uses `configure` will get its RPATH set appropriately.
- Loading branch information