On Tue, Nov 3, 2026, at 5:40 PM, Kamila Szewczyk wrote: > Hi Pietro, Hi Kamila,
Thanks for the reply! > Yes. This is sadly a (known) limitation of autoreconf. Autoconf > supports shell variables in AC_CONFIG_AUX_DIR, but autoreconf reads the > argument literally, without evaluating the shell code that sets the > variable. > > That also explains the "$foo" directory with 2.69. It seems the newer > version catches the missing files, exposing a problem that was already > there... > > So I wouldn't call your usage wrong, although it doesn't work with > autoreconf. Running autoconf and the other required tools directly > should work around it. Fortunately we don't need to set AC_CONFIG_AUX_DIR. I'm testing the update to autoconf 2.73 and automake 1.19 for GCC, binutils, and GDB. The only issue we ran into so far is https://savannah.gnu.org/support/?111400 I tested the patch in that issue and it works fine. I'm adding it to our tree in the hackiest way: https://forge.sourceware.org/pietro/gcc/src/branch/upgrade-autotools/config/autoconf-2.73-patch.m4 It would be great to have that in a release, even better in a 2.73.1 with just that big fix :) Thanks again, Pietro > I recommend steadily upgrading to the newest version. I will perhaps > soon have some free time to look into this. It doesn't look too hard to > provide some reasonable way of doing this. > > This horrible hack could work: > > AC_CONFIG_AUX_DIR([..]) > m4_divert_text([INIT_PREPARE], [ > top_source_dir_var=... > ]) > m4_define([_AC_AUX_DIR_CANDIDATES], [$top_source_dir_var]) > > ... but it will almost certainly break at some point (it's using > internal/unstable variable names). In hindsight, please do not do this. > > -- > With Valediction, > Kamila Szewczyk (https://iczelia.net) > > On 11/3/26 10:03 PM, Pietro Monteiro wrote: >> Hello, >> >> GCC, binutils and GDB use an specific version of autoconf, currently >> 2.69, and include the generated files in their repositories and >> releases. I'm looking into upgrading the the version of autoconf and >> ran into a problem with autoreconf and using a variable in >> AC_CONFIG_AUX_DIR. >> >> To support multilibs and sharing libiberty between gcc and >> binutils-gdb source trees we use a bit of shell to determine the top >> source directory and then use AC_CONFIG_AUX_DIR($top_source_dir_var). >> >> Running autoreconf 2.69 on the libiberty directory creates a directory >> with the same name of the variable used in AC_CONFIG_AUX_DIR. Ex: >> AC_CONFIG_AUX_DIR($foo) creates a directory "$foo", dolar sign >> included, in the libiberty source directory. But it runs to completion >> re-creating all necessary files and exiting with status 0. >> >> Autoreconf 2.73 errors out saying it can't find config.guess, >> config.sub, and install-sh. >> >> Is this a bug on autoreconf? Or in our usage of AC_CONFIG_AUX_DIR? >> Looking into AC_CONFIG_AUX_DIR code it seems that using variables with >> it is ok from autoconf's point of view. Autoconf 2.73 runs fine on libiberty. >> >> Thanks, >> Pietro >> >> >> > > > Attachments: > * OpenPGP_0xC868F0B6DE38409D.asc > * OpenPGP_signature.asc
