https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108909
Bug ID: 108909 Summary: Build process does not honor discovered path to "gnatmake" and "gnatlink" Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: emr-gnu at hev dot psu.edu CC: dkm at gcc dot gnu.org Target Milestone: --- Created attachment 54521 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54521&action=edit Patch to resolve gnatmake build issue When attempting to build GCC 12.2 from released source: $ GNATBIND=gnatbind-12.1 GNATMAKE=gnatmake-12.1 ../gcc-12.2.0/configure --enable-languages=c,c++,ada,fortran --program-suffix=-12.2 {...blah blah...} {...} checking for x86_64-linux-gnu-gnatbind... gnatbind-12.1 checking for x86_64-linux-gnu-gnatmake... gnatmake-12.1 checking whether compiler driver understands Ada... yes {...much later...} mkdir -p ada/gen_il cd ada/gen_il; gnatmake -q -g -gnata -gnat2012 -gnatw.g -gnatyg -gnatU -I/build/gcc-12.2.0/gcc/ada gen_il-main /bin/sh: gnatmake: command not found make: *** [ada/stamp-gen_il] Error 127 This seems similar to PR 30541, in that if your system-level packages don't have the GNAT tools installed, but you have specified an alternate compiler path to Ada tools in the environment, the build scripts ignore the configure-guessed (or environment-specified) options, and just blindly call "gnatmake". Thus, the build fails. The fix is to change lines 21, 42, and 49 of gcc/ada/Make-generated.in to use "$(GNATMAKE)" instead of "gnatmake".