[Bug #20800] Use config target for bin directory as-is

The "target" in `RbConfig::CONFIG` is being changed from config.sub to
align to the system `uname`. Use the value modified by config.sub, and
make the directory same as GNU utilities, such as binutils.
This commit is contained in:
Nobuyoshi Nakada 2024-11-09 20:37:40 +09:00
parent 379bbd6d9c
commit 9588319e72
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
Notes: git 2024-11-09 12:50:57 +00:00
2 changed files with 2 additions and 1 deletions

View File

@ -149,6 +149,7 @@ dnl checks for alternative programs
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AC_SUBST(config_target, $target)
AS_CASE(["$target_cpu-$target_os"],
[aarch64-darwin*], [
target_cpu=arm64

View File

@ -367,7 +367,7 @@ goruby_install_name = "go" + ruby_install_name
bindir = CONFIG["bindir", true]
if CONFIG["libdirname"] == "archlibdir"
archbindir = bindir.sub(%r[/\K(?=[^/]+\z)]) {CONFIG["target"] + "/"}
archbindir = bindir.sub(%r[/\K(?=[^/]+\z)]) {CONFIG["config_target"] + "/"}
end
libdir = CONFIG[CONFIG.fetch("libdirname", "libdir"), true]
rubyhdrdir = CONFIG["rubyhdrdir", true]