Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make: add -rpath to LD_SEARCH_FLAGS #2280

Merged
merged 3 commits into from
Apr 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
SHLIB_SUFFIX=".so"
SHLIB_LD="${CC} -shared"
LDFLAGS="-Wl,--export-dynamic"
LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR} -Wl,-rpath,${INST_DIR}/lib'
LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
;;
*-pc-cygwin)
Expand Down Expand Up @@ -562,7 +562,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
SHLIB_SUFFIX=".so"
LDFLAGS="-Wl,--export-dynamic"
#LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR} -Wl,-rpath,${INST_DIR}/lib'
# TODO: add optional pthread support with any combination of:
# CFLAGS="$CFLAGS -pthread"
# LDFLAGS="$LDFLAGS -lpthread"
Expand All @@ -576,7 +576,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
SHLIB_LD_LIBS="${LIBS}"
LDFLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
SHLIB_LD_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -L${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-Wl,-rpath,${INST_DIR}/lib -L${LIB_RUNTIME_DIR}'
# some older NetBSD versions do not handle version numbers with dots.
#STLIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
#SHLIB_SUFFIX='${GRASS_TRIM_DOTS}.so'
Expand Down
6 changes: 3 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -4032,7 +4032,7 @@ ac_save_ldflags="$LDFLAGS"
SHLIB_SUFFIX=".so"
SHLIB_LD="${CC} -shared"
LDFLAGS="-Wl,--export-dynamic"
LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR} -Wl,-rpath,${INST_DIR}/lib'
LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
;;
*-pc-cygwin)
Expand Down Expand Up @@ -4114,7 +4114,7 @@ $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
SHLIB_SUFFIX=".so"
LDFLAGS="-Wl,--export-dynamic"
#LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR} -Wl,-rpath,${INST_DIR}/lib'
# TODO: add optional pthread support with any combination of:
# CFLAGS="$CFLAGS -pthread"
# LDFLAGS="$LDFLAGS -lpthread"
Expand All @@ -4128,7 +4128,7 @@ $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
SHLIB_LD_LIBS="${LIBS}"
LDFLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
SHLIB_LD_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -L${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-Wl,-rpath,${INST_DIR}/lib -L${LIB_RUNTIME_DIR}'
# some older NetBSD versions do not handle version numbers with dots.
#STLIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
#SHLIB_SUFFIX='${GRASS_TRIM_DOTS}.so'
Expand Down