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
Actions

Also available in: PDF Atom