Feature #22626
openRemove unused XRUBY_LIBDIR from the cross-build configuration
Description
During cross configuration, configure.ac runs the build-machine Ruby to read RbConfig::CONFIG["libdir"] and substitutes the result as XRUBY_LIBDIR in the generated Makefile.
I found no in-tree consumer of this variable in CRuby 4.0.10.
The install-cross target uses XRUBY_RUBYLIBDIR and XRUBY_RUBYHDRDIR for its install paths.
I propose removing the libdir lookup, its AC_SUBST call, and the corresponding assignment in template/Makefile.in.
This saves one Ruby invocation during cross configuration.
I tested the attached patch against the official CRuby 4.0.10 source tarball, cross-compiling from x86-64 Linux to AArch64 Linux.
make -j8 completed, and the resulting interpreter ran under QEMU and reported ruby 4.0.10 ... [aarch64-linux]. OpenSSL and Psych were excluded from the build.
In a separate clean build configured with --enable-shared, make install-cross also succeeded.
I verified that it installed rbconfig.rb, config.h, and an AArch64 libruby.so.
Files