Hi,

The standard name to configure the compiler that compiles against the build machine (used e.g. to compile info/makedoc.c that runs during build even when cross-compiling) is CC_FOR_BUILD. However, texinfo’s configure.ac file uses BUILD_CC. The name CC_FOR_BUILD is much more common than BUILD_CC nowadays. E.g. there is a macro for CC_FOR_BUILD in autoconf-archive (https://www.gnu.org/software/autoconf-archive/ax_prog_cc_for_build.html).

Autoconf’s config.guess script renamed BUILD_CC to CC_FOR_BUILD in 1999 [1]. Even at the time when cross-compiling support was added to texinfo, the config.guess script included in the texinfo sources was already using CC_FOR_BUILD. In theory, things could go wrong if only one of BUILD_CC or CC_FOR_BUILD are set when --build is not passed to configure.

For these two reasons, I suggest that texinfo should use CC_FOR_BUILD instead of BUILD_CC to compile info/makedoc.c etc. I can send a patch for this if nobody opposes. Also, I can send an additional patch adding CC_FOR_BUILD to `configure --help` (CC is already documented).

If this change is made, BUILD_CC could stay as a fallback for backwards compatibility. In this case, a warning could be printed.

(Texinfo also uses BUILD_AR and BUILD_RANLIB. Similar considerations apply to these.)

-Manuel

[1] https://gitweb.git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commit;h=9c3f31ada2c39dd867e365913fbab00fbf2aa886

Reply via email to