https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124547
--- Comment #17 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <[email protected]>: https://gcc.gnu.org/g:c31ce49786b85a515d5d1dcb5f25e7076e28a072 commit r16-8150-gc31ce49786b85a515d5d1dcb5f25e7076e28a072 Author: Jakub Jelinek <[email protected]> Date: Wed Mar 18 08:41:13 2026 +0100 onfigure: Partial fix for the {gas,gnu_ld}{,_flag} breakage [PR124547] Here is a partial fix for the PR124547 breakages. Setting {gas,gnu_ld}_flag to no when user didn't specify any of --with{,out}-gnu-{as,ld} nor --with-gnu-{as,ld}={yes,no} seems wrong when we want to later override it based on # Check if we are using GNU ld if not already set. if test -z "$gnu_ld_flag"; then if $gcc_cv_ld --version 2>/dev/null | grep GNU > /dev/null; then gnu_ld_flag=yes else gnu_ld_flag=no fi fi or # Check if we are using GNU as if not already set. if test -z "$gas_flag"; then if $gcc_cv_as --version 2>/dev/null | grep GNU > /dev/null; then gas_flag=yes else gas_flag=no fi fi So, this patch unsets it if not explicitly specified so that the later overriding works. On x86_64-linux it restores the auto-host.h and Makefile differences: -LD_VERSION_SCRIPT_OPTION = -LD_SONAME_OPTION = +LD_VERSION_SCRIPT_OPTION = --version-script +LD_SONAME_OPTION = -soname and -#define HAVE_AS_IX86_GOT32X 0 +#define HAVE_AS_IX86_GOT32X 1 #endif -#define HAVE_AS_IX86_TLSLDM 0 +#define HAVE_AS_IX86_TLSLDM 1 -#define HAVE_AS_IX86_TLS_GET_ADDR_GOT 0 +#define HAVE_AS_IX86_TLS_GET_ADDR_GOT 1 -/* #undef HAVE_LD_DEMANGLE */ +#define HAVE_LD_DEMANGLE 1 I agree with Andreas in the PR that after including config.gcc configure should be using gas and gnu_ld vars rather than gas_flag and gnu_ld_flag, but this patch doesn't implement that (yet). I think to do that, it would need to move the AS_VAR_SET_IF(gcc_cv_as,, [ AC_MSG_CHECKING(Solaris assembler) # Check if we are using GNU as if not already set. and AC_MSG_CHECKING(Solaris linker) # Identify the linker which will work hand-in-glove with the newly # Check if we are using GNU ld if not already set. hunks in configure.ac from where they are to before config.gcc inclusion, and sed s/\(gnu_ld\|gas\)_flag/\1/g after the config.gcc inclusion. I can prepare/test the patch tomorrow, but IMHO this patch is a good start. 2026-03-18 Jakub Jelinek <[email protected]> PR bootstrap/124547 * configure.ac (--with-gnu-ld): Set gnu_ld_flag= instead of gnu_ld_flag=no if not explicitly specified. (--with-gnu-as): Similarly for gas_flag. (DEFAULT_ASSEMBLER): Use wording without GNU as whenever gas_flag is not yes rather than when it is no. * configure: Regenerate.
