public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/110284] New: [14 Regression] Bootstrap failures with m2
@ 2023-06-16 12:40 jakub at gcc dot gnu.org
  2023-06-16 12:40 ` [Bug modula2/110284] " jakub at gcc dot gnu.org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-06-16 12:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110284

            Bug ID: 110284
           Summary: [14 Regression] Bootstrap failures with m2
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: modula2
          Assignee: gaius at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

As mentioned in
https://gcc.gnu.org/pipermail/gcc-patches/2023-June/620819.html
and later in
https://gcc.gnu.org/pipermail/gcc-patches/2023-June/621576.html
since the inclusion of insn-opinit.h (generated header) in internal-fn.h
parallel bootstraps with modula2 enabled randomly fail with errors like:
In file included from ../../gcc/m2/gm2-gcc/gcc-consolidation.h:74,
                 from ../../gcc/m2/gm2-lang.cc:24:
../../gcc/internal-fn.h:24:10: fatal error: insn-opinit.h: No such file or
directory
   24 | #include "insn-opinit.h"
      |          ^~~~~~~~~~~~~~~
compilation terminated.
(not always, just sometimes with bad luck).
My r14-1603-g00bfc503cc3b3e8f3 commit for this was actually incorrect and
should be reverted - the problem is that gcc/m2/Make-lang.in is included before
generated_files
variable is set in gcc/Makefile.in and the order only rule
$(GM2_C_OBJS) : | $(generated_files)
is then expanded at that point as
$(GM2_C_OBJS) : | 
and so doesn't actually do anything.

As I said, the right fix is mentioned in the second mail,
-$(GM2_C_OBJS) : | $(generated_files)
+m2_OBJS = $(GM2_C_OBJS)
should work correctly, because then the
$(ALL_HOST_OBJS) : | $(generated_files)
rule in gcc/Makefile.in will include the m2 FE files and will DTRT.

The problem is that this needs further work on the m2 FE, which I can't easily
do because I don't know much about the FE.  Inclusion in m2_OBJS means they
will be
compiled with -DIN_GCC_FRONTEND and e.g. checking in system.h tries to make
sure
that rtl.h, except.h etc. headers aren't included in the FEs, but m2 FE does
include them (not sure why, most of them probably uselessly).  There is a
further problem that
m2 compiles its own variant of stor-layout.cc which is clearly a backend file.

If this can't be made to work correctly, I guess as last resort perhaps
-$(GM2_C_OBJS) : | $(generated_files)
+ALL_HOST_OBJS += $(GM2_C_OBJS)
could be used, which would be an ugly hack, but I think putting it in m2_OBJS
is the right thing.

Gaius, could you please have a look?
Thanks.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2023-07-31 18:44 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-16 12:40 [Bug modula2/110284] New: [14 Regression] Bootstrap failures with m2 jakub at gcc dot gnu.org
2023-06-16 12:40 ` [Bug modula2/110284] " jakub at gcc dot gnu.org
2023-06-17 21:07 ` gaius at gcc dot gnu.org
2023-06-18 14:58 ` gaius at gcc dot gnu.org
2023-06-18 15:01 ` jakub at gcc dot gnu.org
2023-06-18 19:23 ` gaius at gcc dot gnu.org
2023-06-18 20:08 ` cvs-commit at gcc dot gnu.org
2023-06-18 20:14 ` gaius at gcc dot gnu.org
2023-06-18 20:52 ` jakub at gcc dot gnu.org
2023-06-18 21:24 ` gaius at gcc dot gnu.org
2023-06-20 17:04 ` jakub at gcc dot gnu.org
2023-06-20 17:23 ` jakub at gcc dot gnu.org
2023-06-20 22:00 ` iains at gcc dot gnu.org
2023-06-23 15:08 ` gaius at gcc dot gnu.org
2023-07-19  8:49 ` jakub at gcc dot gnu.org
2023-07-19 16:07 ` gaius at gcc dot gnu.org
2023-07-19 20:02 ` cvs-commit at gcc dot gnu.org
2023-07-19 20:08 ` gaius at gcc dot gnu.org
2023-07-31 18:44 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).