https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111021
Bug ID: 111021 Summary: [14 Regression] Serial build broken for CRIS, ARM, and others Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: hp at gcc dot gnu.org CC: linkw at gcc dot gnu.org Target Milestone: --- Since r14-3092-g165b1f6ad1d396 "targhooks: Extend legitimate_address_p with code_helper [PR110248]", build has been broken (at least with "GNU Make 4.3") for *serial* builds (no "-j" option) for those target where that commit added an include of tree.h was added, exposed by building for example cris-elf and arm-eabi (wrapped lines copy-pasted): g++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I/srctop/gcc -I/srctop/gcc/build -I/srctop/gcc/../include -I/srctop/gcc/../libcpp/include \ -o build/gencondmd.o build/gencondmd.cc In file included from /srctop/gcc/tree.h:23, from /srctop/gcc/config/arm/arm-protos.h:26, from ./tm_p.h:5, from build/gencondmd.cc:29: /srctop/gcc/tree-core.h:145:10: fatal error: all-tree.def: No such file or directory 145 | #include "all-tree.def" | ^~~~~~~~~~~~~~ compilation terminated. make[2]: *** [Makefile:2918: build/gencondmd.o] Error 1 At a glance, (at least) build/gencondmd.o lacks a dependency on the generated all-tree.def. But adding only that dependency leads to a similar error for a missing of tree-check.h; looks like TREE_H contains the right bits. Maybe it's as "simple" as including $(TREE_H) in TM_P (or a new intermediary macro) or add $(TREE_H) to all build/gen*.o rules where the gen*.cc includes "tm_p.h" (but within the filter-out for build/gencondmd.o). I *did* try the latter; simply adding $(TREE_H) (within the filter-out call) for build/gencondmd.o and that seemed to work, but it doesn't seem *right* and may work just by happenstance, as other build/gen*.o seems like they could fail given unfortunate timing or Makefile tweak. It seems proper to leave that headache to the author of that the offending commit. (I'm going to bail out for CRIS with a patch to cris-protos.h, wrapping the function that needs to be prototyped so it doesn't need to refer to ERROR_MARK.)