From: Gaius Mulley Date: Wed, 19 Jul 2023 20:01:53 +0000 (+0100) Subject: PR modula2/110284 Make-lang-in m2flex.o and m2pp.o X-Git-Tag: basepoints/gcc-15~7485 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01f6e8b013237041adeac370f8d229aea6304591;p=thirdparty%2Fgcc.git PR modula2/110284 Make-lang-in m2flex.o and m2pp.o This patch moves the rule c-family/m2pp.o from Make-lang.in into Make-maintainer.in. It also adds m2/gm2-gcc/rtegraph.o and m2/gm2-compiler-boot/m2flex.o to m2_OBJS. The object m2/gm2-compiler-boot/m2flex.o is needed by cc1gm2 whereas m2/gm2-compiler/m2flex.o is required by m2/stage2/cc1gm2 (which is only built in maintainer to allow debugging via m2 sources rather than the translated to C++ sources). PR modula2/110284 * Make-lang.in (m2_OBJS): Add m2/gm2-gcc/rtegraph.o and m2/gm2-compiler-boot/m2flex.o. (c-family/m2pp.o): Remove. * Make-maintainer.in (c-family/m2pp.o): Add. Signed-off-by: Gaius Mulley --- diff --git a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in index ab821136d93e..23632c29125b 100644 --- a/gcc/m2/Make-lang.in +++ b/gcc/m2/Make-lang.in @@ -516,7 +516,8 @@ GM2_LIBS_BOOT = m2/gm2-compiler-boot/gm2.a \ m2/gm2-libs-boot/libgm2.a \ $(GM2-BOOT-O) -m2_OBJS = $(GM2_C_OBJS) +m2_OBJS = $(GM2_C_OBJS) m2/gm2-gcc/rtegraph.o \ + m2/gm2-compiler-boot/m2flex.o cc1gm2$(exeext): m2/stage1/cc1gm2$(exeext) $(m2.prev) cp -p $< $@ @@ -586,10 +587,6 @@ m2/gm2-gcc/rtegraph.o: $(srcdir)/m2/gm2-gcc/rtegraph.cc $(GCC_HEADER_DEPENDENCIE $(COMPILER) -c -g $(GM2GCC) $(ALL_COMPILERFLAGS) \ $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) -c-family/m2pp.o : $(srcdir)/m2/m2pp.cc $(GCC_HEADER_DEPENDENCIES_FOR_M2) - $(COMPILER) -c -g $(ALL_COMPILERFLAGS) \ - $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) - m2/gm2-gcc/$(SRC_PREFIX)%.h: $(srcdir)/m2/gm2-gcc/%.def $(MCDEPS) -test -d $(@D) || $(mkinstalldirs) $(@D) $(MC) -o=$@ $(srcdir)/m2/gm2-gcc/$*.def diff --git a/gcc/m2/Make-maintainer.in b/gcc/m2/Make-maintainer.in index 363e6ed24ae5..c94d15bf5b27 100644 --- a/gcc/m2/Make-maintainer.in +++ b/gcc/m2/Make-maintainer.in @@ -150,6 +150,10 @@ m2/gm2-ppg-boot/main.o: $(M2LINK) $(srcdir)/m2/init/mcinit m2/gm2-auto: -test -d $@ || $(mkinstalldirs) $@ +c-family/m2pp.o : $(srcdir)/m2/m2pp.cc $(GCC_HEADER_DEPENDENCIES_FOR_M2) + $(COMPILER) -c -g $(ALL_COMPILERFLAGS) \ + $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) + # m2/pg$(exext) is the 2nd generation parser generator built from ebnf # without error recovery