Project

General

Profile

Actions

Feature #22626

open

Remove unused XRUBY_LIBDIR from the cross-build configuration

Feature #22626: Remove unused XRUBY_LIBDIR from the cross-build configuration

Added by ledsun (shigeru nakajima) 4 days ago. Updated 2 days ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:127673]

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

ruby-4.0.10-remove-xruby-libdir.patch (1.06 KB) ruby-4.0.10-remove-xruby-libdir.patch ledsun (shigeru nakajima), 11/22/2026 02:15 PM

Updated by nobu (Nobuyoshi Nakada) 2 days ago Actions #1 [ruby-core:127694]

Do you want to create a PR by yourself?

Updated by ledsun (shigeru nakajima) 2 days ago Actions #2

Yes, thanks!
I’ll open a PR and link it here.

Updated by ledsun (shigeru nakajima) 2 days ago Actions #3

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.

Actions

Also available in: PDF Atom