Skip to content

fix --enable-load-relative on systems with /lib64 #170

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

Closed
wants to merge 1 commit into from
Closed
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
3 changes: 2 additions & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -2587,7 +2587,8 @@ AS_CASE("$enable_shared", [yes], [
LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
if test "$load_relative" = yes; then
LIBRUBY_RPATHFLAGS="'-Wl,-rpath,\$\${ORIGIN}/../lib'"
lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
LIBRUBY_RPATHFLAGS="'-Wl,-rpath,\$\${ORIGIN}/../lib/${lt_multi_os_dir}'"
LIBRUBY_RELATIVE=yes
fi
],
Expand Down
3 changes: 3 additions & 0 deletions ruby.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,9 @@ ruby_init_loadpath_safe(int safe_level)
if (p - libpath > 3 && !(STRCASECMP(p - 4, "/bin") && strcmp(p - 4, "/lib"))) {
p -= 4;
*p = 0;
} else if (p - libpath > 5 && !(STRCASECMP(p - 4, "/bin") && strcmp(p - 6, "/lib64"))) {
p -= 6;
*p = 0;
}
}
#if !VARIABLE_LIBPATH
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy