Rainer Orth <[email protected]> writes: > This patch > > commit cc12934b555625b130e242eb6199c60b353ab509 > Author: Rainer Orth <[email protected]> > Date: Tue Feb 3 20:41:40 2026 +0100 > > build: Only use gas_flag/gnu_ld_flag internally [PR123841] > > caused testsuite regressions on Linux/x86_64 in one configuration: if > configured without --with-gnu-as/--with-gnu-ld, taking as and ld from > PATH, the stage 1 gcc/auto-host.h differs: > > @@ -538 +544 @@ > -#define HAVE_AS_IX86_GOT32X 1 > +#define HAVE_AS_IX86_GOT32X 0 > @@ -586 +592 @@ > -#define HAVE_AS_IX86_TLSLDM 1 > +#define HAVE_AS_IX86_TLSLDM 0 > @@ -599 +605 @@ > -#define HAVE_AS_IX86_TLS_GET_ADDR_GOT 1 > +#define HAVE_AS_IX86_TLS_GET_ADDR_GOT 0 > @@ -1795 +1801 @@ > -#define HAVE_LD_DEMANGLE 1 > +/* #undef HAVE_LD_DEMANGLE */ > > gas_flag and gnu_ld_flag weren't set correctly in this case: > > Without --with-gnu-ld, AC_ARG_WITH(gnu-ld) sets gnu_ld_flag to no. The > later check to determine gnu_ld_flag from $gcc_cv_ld --version isn't > even run because it is guarded by test -z "$gnu_ld_flag". > > To avoid this, two things need to happen: > > * The ld --version check needs to be done in the ACTION_IF_NOT case of > AC_ARG_WITH(gnu-ld), not afterwards. > > * For this to work, gcc_cv_ld needs to be set at this point. > > Therefore this patch does the first. In order for the second to work, > AC_ARG_WITH(gnu-ld) is moved later when gcc_cv_ld has already been set. > > The same applies to gas_flag, too. > > Tested on x86_64-pc-linux-gnu and sparc64-pc-linux-gnu like so:
Belated but LGTM. I'm happy to look at further patches for these as well (hopefully mostly in stage1; unfortunately the timing for the previous issue didn't interact well w/ FOSDEM timing). Thanks for handling all of this - it's pretty grotty and it took me a while to follow a bunch of it when I've had to look at it before. > [...] sam
signature.asc
Description: PGP signature
