Actions
Feature #22628
openconfigure: Skip the GNU config downloader when both auxiliary files exist
Feature #22628:
configure: Skip the GNU config downloader when both auxiliary files exist
Status:
Open
Assignee:
-
Target version:
-
Description
For the official source tarball, I’d like native and cross builds to handle config.guess and config.sub the same way.
Today, a native build without BASERUBY uses the bundled files directly, while a cross build requires BASERUBY and therefore takes an extra trip through the downloader to use those same files.
Could configure check whether both files are already present before invoking the downloader?
With that check, both builds would use the bundled files directly, regardless of whether BASERUBY is available.
Here is the patch I tested.
diff --git a/configure.ac b/configure.ac
index b4dc31c..db5fc98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,7 +93,9 @@ AS_IF([test "${HAVE_BASERUBY:=no}" != no], [
])
RUBY_APPEND_OPTION(BASERUBY, "--disable=gems")
BASERUBY_VERSION=`$BASERUBY -v`
- $BASERUBY -C "$srcdir" tool/downloader.rb -d tool -e gnu config.guess config.sub >&AS_MESSAGE_FD
+ AS_IF([test ! -e "$srcdir/tool/config.guess" || test ! -e "$srcdir/tool/config.sub"], [
+ $BASERUBY -C "$srcdir" tool/downloader.rb -d tool -e gnu config.guess config.sub >&AS_MESSAGE_FD
+ ])
])
AS_IF([test "$HAVE_BASERUBY" = no], [
AS_IF([test "$cross_compiling" = yes], [AC_MSG_ERROR([executable host ruby is required for cross-compiling])])
I verified that cross configuration from the official CRuby 4.0.10 source tarball succeeded on x86-64 Linux targeting AArch64 Linux without invoking tool/downloader.rb.
Actions