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
Updated by nobu (Nobuyoshi Nakada) 2 days ago
Do you want to create a PR by yourself?
Updated by ledsun (shigeru nakajima) 2 days ago
Yes, thanks!
I’ll open a PR and link it here.
Updated by ledsun (shigeru nakajima) 2 days ago
I opened a PR: https://github.com/ruby/ruby/pull/20127
Both Linux cross-build jobs passed.
Five tests timed out in the Windows GNU make job, so I’ve asked in the PR description for a rerun to see whether the timeouts reproduce.