Project

General

Profile

Bug #6903 » ruby-multilib.patch

fixed initial patch for ruby-head - mpapis (Michal Papis), 08/27/2012 05:07 AM

View differences:

configure.in
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
],
-- a/ruby.c
++ b/ruby.c
......
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
(2-2/3)