Skip to content

Commit

Permalink
Add RPATH entries to OpenBLAS explicitly
Browse files Browse the repository at this point in the history
This is necessary for FreeBSD to find `libgfortran` and friends.
  • Loading branch information
staticfloat committed May 30, 2019
1 parent 17bf762 commit 90d0d97
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions OpenBLAS/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ if [[ ${target} == x86_64-w64-mingw32 ]] && [[ $(gcc --version | head -1 | awk '
CFLAGS="${CFLAGS} -fno-asynchronous-unwind-tables"
fi
# Because we use this OpenBLAS within Julia, and often want to bundle our
# libgfortran and other friends alongside, we need an RPATH of '$ORIGIN',
# so set it here.
if [[ ${target} == *linux* ]] || [[ ${target} == *freebsd* ]]; then
LDFLAGS="${LDFLAGS} '-Wl,-rpath,\$\$ORIGIN' -Wl,-z,origin"
elif [[ ${target} == *apple* ]]; then
LDFLAGS="${LDFLAGS} -Wl,-rpath,@loader_path/"
fi
# Enter the fun zone
cd ${WORKSPACE}/srcdir/OpenBLAS-*/
Expand Down

0 comments on commit 90d0d97

Please sign in to comment.