#1108151 gcc-15: FTBFS on targets where algol is disabled

Package:
src:gcc-15
Source:
src:gcc-15
Submitter:
John Paul Adrian Glaubitz
Date:
2025-06-22 07:55:02 UTC
Severity:
normal
#1108151#5
Date:
2025-06-21 16:36:41 UTC
From:
To:
Hi,

on sh4, the gcc-15 build fails with:

Comparing stages 2 and 3
Comparison successful.
if false; then \
  rm -rf stage2-*; \
  echo timestamp >  stage2-lean; \
fi
make[4]: Leaving directory '/<<PKGBUILDDIR>>/build'
make[3]: Leaving directory '/<<PKGBUILDDIR>>/build'
make[3]: Entering directory '/<<PKGBUILDDIR>>/build'
make[3]: Leaving directory '/<<PKGBUILDDIR>>/build'
make[3]: Entering directory '/<<PKGBUILDDIR>>/build'
Makefile:660: *** Recursive variable 'GA68' references itself (eventually).  Stop.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/build'
make[2]: *** [Makefile:25610: bootstrap] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>/build'

Since this already happens after stage 2 and 3 were built and successfully built,
I suspect this to be an issue with the build system. Looking at debian/rules.defs,
sh4 is the only architecture in algol_no_cpus which explains why this Algol-related
failure occurs on sh4 only. I suspect there to be a logic error in any of the rules
files.

I'm trying to build gcc-15 on sh4 with Algol enabled now while also cherry-picking
upstream patches to fix LRA support in the SH backend and also enable it by default.
I will file a separate bug report for that patch.

Thanks,
Adrian

#1108151#10
Date:
2025-06-21 18:15:07 UTC
From:
To:
Hello,

The problem seems to be this line in the top-level Makefile which
references itself when GA68 is not defined.

GA68 = @GA68@

Not sure how to fix it though.

Adrian

#1108151#15
Date:
2025-06-22 07:52:35 UTC
From:
To:
Hi,

FWIW, algol builds fine on sh4. So, please just remove sh4 from
"algol_no_cpus" in debian/rules.defs.

Also, please include the patch from #1108158 on sh4. I have verified
that gcc-15 builds fine on sh4 with the LRA patch applied and Algol
enabled.

I just uploaded the build result to unreleased.

Thanks,
Adrian