Problem: configure: -lruby is added to the link flags even for a
dynamic ruby build, creating a hard dependency on the Ruby
library (Johannes Schindelin, after v9.2.0674).
Solution: For a dynamic build filter out -l flags from librubyarg.
related: #20558
Signed-off-by: Christian Brabandt <cb@256bit.org>
RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" $RUBY_CFLAGS"
RUBY_LIBS=
+ for arg in $librubyarg; do
+ case "$arg" in
+ -L*|-R*|-Wl,-R*|-Wl,-rpath*) RUBY_LIBS="$RUBY_LIBS $arg" ;;
+ esac
+ done
+ librubyarg=
fi
if test "X$librubyarg" != "X"; then
RUBY_LIBS="$librubyarg $RUBY_LIBS"
AC_DEFINE(DYNAMIC_RUBY)
RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" $RUBY_CFLAGS"
RUBY_LIBS=
+ dnl For dynamic Ruby keep only the library search path / runpath from
+ dnl librubyarg so the dlopen()ed library can be found at runtime,
+ dnl without adding -lruby and thus a hard dependency on the Ruby
+ dnl library, which would defeat dynamic loading.
+ for arg in $librubyarg; do
+ case "$arg" in
+ -L*|-R*|-Wl,-R*|-Wl,-rpath*) RUBY_LIBS="$RUBY_LIBS $arg" ;;
+ esac
+ done
+ librubyarg=
fi
if test "X$librubyarg" != "X"; then
RUBY_LIBS="$librubyarg $RUBY_LIBS"
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 681,
/**/
680,
/**/