summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-11-30 12:36:49 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-11-30 12:40:02 +0900
commit316caf6b39a26ed764a1bd1da58291fc5e7ebd52 (patch)
treec4b9d65c7b82ea8b8d8bf0c242b6d41e2f0aeeba
parenteac347fdb04023e1a365d84a8c163263cc7a5904 (diff)
Enable load-relative on Solaris
-rw-r--r--configure.ac8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index a3e97d54db..bb58fad089 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3485,7 +3485,13 @@ AS_CASE("$enable_shared", [yes], [
LIBRUBY_SONAME='lib$(RUBY_SO_NAME).$(SOEXT).$(RUBY_PROGRAM_VERSION)'
LIBRUBY_ALIASES='$(LIBRUBY_SONAME) lib$(RUBY_SO_NAME).$(SOEXT)'
RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS, ["${linker_flag}-h${linker_flag:+,}"'$(@F)'])
- XLDFLAGS="$XLDFLAGS "'-R${libdir}'
+ AS_IF([test "$load_relative" = yes], [
+ libprefix="'\$\$ORIGIN/../${libdir_basename}'"
+ LIBRUBY_RPATHFLAGS="-R${libprefix}"
+ LIBRUBY_RELATIVE=yes
+ ], [
+ LIBRUBY_RPATHFLAGS='-R${libdir}'
+ ])
],
[hpux*], [
XLDFLAGS="$XLDFLAGS "'-Wl,+s,+b,$(libdir)'