From: Gaius Mulley <gaiusmod2@gmail.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] 2/19 modula2 front end: Make-lang.in
Date: Fri, 11 Nov 2022 22:55:55 +0000 [thread overview]
Message-ID: <87mt8x3xtw.fsf@debian> (raw)
In-Reply-To: <CAFiYyc1DgK2HbSDLtk9BYBzCZVxvtT8k5Oj0owaHh++p0+eGdQ@mail.gmail.com> (Richard Biener's message of "Fri, 11 Nov 2022 14:56:38 +0100")
Richard Biener <richard.guenther@gmail.com> writes:
>> +M2_MAINTAINER = no
>> +
>> +CPP_GM2=-fpermissive -DIN_GCC -g
>
> Do we really need -fpermissive here?
no not needed (and now removed) - thanks for spotting it.
>> +GM2_1 = ./gm2 -B./stage1/m2 -g -fm2-g
>> +
>> +GM2_FOR_TARGET = $(STAGE_CC_WRAPPER) ./gm2 -B./ -B$(build_tooldir)/bin/ -L$(objdir)/../ld $(TFLAGS)
>> +
>> +TEXISRC = $(objdir)/m2/images/gnu.eps \
>> + $(srcdir)/doc/gm2.texi \
>> + m2/gm2-libs.texi \
>> + m2/gm2-ebnf.texi \
>> + m2/SYSTEM-pim.texi \
>> + m2/SYSTEM-iso.texi \
>> + m2/Builtins.texi
>> +
>
> That will need Sphinx treatment
true
>> +# Define the names for selecting modula-2 in LANGUAGES.
snip
>> +m2.info: doc/m2.info
>> +
>> +m2.man: doc/m2.1
>> +
>> +m2.install-man: $(DESTDIR)$(man1dir)/$(GM2_INSTALL_NAME)$(man1ext)
>> +
>> +$(DESTDIR)$(man1dir)/$(GM2_INSTALL_NAME)$(man1ext): doc/m2.1 installdirs
>> + -rm -f $@
>> + -$(INSTALL_DATA) $< $@
>> + -chmod a-x $@
>> +
>> +m2.dvi: $(TEXISRC)
>> + $(TEXI2DVI) -I $(objdir)/m2 -I $(srcdir)/doc/include $(srcdir)/doc/gm2.texi -o $@
>> +
>> +m2.ps: m2.dvi
>> + dvips -o $@ $<
>> +
>> +m2.pdf: m2.ps
>> + gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=$@ $<
>> +
>> +.INTERMEDIATE: gm2.pod
>> +
>> +m2.pod: doc/gm2.texi $(TEXISRC)
>> + -$(TEXI2POD) -I $(objdir)/m2 -D m2 < $< > $@
>
> Likewise for the doc parts above and below
yes, sure I'll convert them
>> +doc/m2.info: $(TEXISRC)
>> + if test "x$(BUILD_INFO)" = xinfo; then \
>> + rm -f doc/m2.info*; \
>> + $(MAKEINFO) --no-headers -I$(objdir)/m2 -I$(srcdir)/doc/include \
>> + -o $@ $(srcdir)/doc/gm2.texi ; \
>> + else true; fi
>> +
>> +$(objdir)/m2/images/gnu.eps: $(srcdir)/m2/images/gnupng
>> + test -d m2/images || mkdir -p m2/images
>> + if [ -f $(srcdir)/m2/images/gnu.eps ] ; then \
>> + cp $(srcdir)/m2/images/gnu.eps $@ ; \
>> + else \
>> + pngtopnm $< | pnmtops -noturn > $@ ; \
>> + fi
>> +
>> +m2/gm2-libs.texi: gm2-libs.texi-check; @true
>> +
>> +gm2-libs.texi-check: m2/SYSTEM-pim.texi m2/SYSTEM-iso.texi m2/Builtins.texi \
>> + $(objdir)/m2/gm2-libs-coroutines/SYSTEM.def m2/gm2-ebnf.texi
>> + python3 $(srcdir)/m2/tools-src/def2texi.py -uLibraries -s$(srcdir)/m2 -b$(objdir)/m2 > $(objdir)/m2/gm2-libs.texi
>> + $(STAMP) gm2-libs.texi-check
>> +
>> +m2/gm2-ebnf.texi: gm2-ebnf.texi-check; @true
>> +
>> +gm2-ebnf.texi-check: $(PGE) $(srcdir)/m2/gm2-compiler/P0SyntaxCheck.bnf
>> + $(PGE) -c -p -t -f $(srcdir)/m2/gm2-compiler/P0SyntaxCheck.bnf > m2/gm2-ebnf.texi
>> + $(STAMP) gm2-ebnf.texi-check
>> +
>> +m2/SYSTEM-pim.texi: SYSTEM-pim-texi-check; @true
>> +
>> +SYSTEM-pim-texi-check: $(objdir)/m2/gm2-libs/SYSTEM.def
>> + python3 $(srcdir)/m2/tools-src/def2texi.py -b$(objdir)/m2 -f$(objdir)/m2/gm2-libs/SYSTEM.def > $(objdir)/m2/SYSTEM-pim.texi
>> + $(STAMP) SYSTEM-pim-texi-check
>> +
>> +m2/SYSTEM-iso.texi: SYSTEM-iso.texi-check; @true
>> +
>> +SYSTEM-iso.texi-check: $(objdir)/m2/gm2-libs-iso/SYSTEM.def
>> + python3 $(srcdir)/m2/tools-src/def2texi.py -b$(objdir)/m2 -f$(objdir)/m2/gm2-libs-iso/SYSTEM.def > $(objdir)/m2/SYSTEM-iso.texi
>> + $(STAMP) SYSTEM-iso.texi-check
>> +
>> +m2/Builtins.texi: Builtins.texi-check; @true
>> +
>> +Builtins.texi-check: m2/gm2-libs/Builtins.def
>> + python3 $(srcdir)/m2/tools-src/def2texi.py -b./ -f$(srcdir)/m2/gm2-libs/Builtins.def > $(objdir)/m2/Builtins.texi
>> + $(STAMP) Builtins.texi-check
snip
>> +gm2.paranoid: stage3/m2/cc1gm2$(exeext) gm2.verifyparanoid
>> +
>> +cc1gm2$(exeext): stage1/m2/cc1gm2$(exeext) $(m2.prev)
>> + cp -p $< $@
>> +
>> +stage3/m2/cc1gm2$(exeext): stage2/m2/cc1gm2$(exeext) m2/gm2-compiler-paranoid/m2flex.o \
>> + $(P) $(GM2_C_OBJS) $(BACKEND) $(LIBDEPS) $(GM2_LIBS_PARANOID) \
>> + m2/gm2-gcc/rtegraph.o plugin/m2rte$(exeext).so
>> + @$(call LINK_PROGRESS,$(INDEX.m2),start)
>> + +$(LLINKER) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GM2_C_OBJS) m2/gm2-compiler-paranoid/m2flex.o \
>> + attribs.o \
>> + $(GM2_LIBS_PARANOID) \
>> + $(BACKEND) $(LIBS) m2/gm2-gcc/rtegraph.o \
>> + $(BACKENDLIBS) $(LIBSTDCXX) -lm
>> + @$(call LINK_PROGRESS,$(INDEX.m2),end)
>> +
>> +stage2/m2/cc1gm2$(exeext): stage1/m2/cc1gm2$(exeext) m2/gm2-compiler/m2flex.o $(P) \
>> + $(GM2_C_OBJS) $(BACKEND) $(LIBDEPS) $(GM2_LIBS) \
>> + m2/gm2-gcc/rtegraph.o plugin/m2rte$(exeext).so
>> + @$(call LINK_PROGRESS,$(INDEX.m2),start)
>> + +$(LLINKER) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GM2_C_OBJS) m2/gm2-compiler/m2flex.o \
>> + attribs.o \
>> + $(GM2_LIBS) \
>> + $(BACKEND) $(LIBS) m2/gm2-gcc/rtegraph.o \
>> + $(BACKENDLIBS) $(LIBSTDCXX) -lm
>> + @$(call LINK_PROGRESS,$(INDEX.m2),end)
>> +
>> +stage1/m2/cc1gm2$(exeext): gm2$(exeext) m2/gm2-compiler-boot/m2flex.o \
>> + $(P) $(GM2_C_OBJS) $(BACKEND) $(LIBDEPS) \
>> + $(GM2_LIBS_BOOT) $(MC_LIBS) \
>> + m2/gm2-gcc/rtegraph.o plugin/m2rte$(exeext).so \
>> + m2/gm2-libs-boot/M2LINK.o \
>> + $(m2.prev)
>> + @$(call LINK_PROGRESS,$(INDEX.m2),start)
>> + +$(LLINKER) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GM2_C_OBJS) m2/gm2-compiler-boot/m2flex.o \
>> + attribs.o \
>> + $(GM2_LIBS_BOOT) $(MC_LIBS) \
>> + m2/gm2-gcc/rtegraph.o m2/gm2-libs-boot/M2LINK.o \
>> + $(BACKEND) $(LIBS) $(BACKENDLIBS)
>> + @$(call LINK_PROGRESS,$(INDEX.m2),end)
>
> It looks like you are employing your own bootstrapping scheme here?
> In theory one could
> use --enable-stage1-languages=m2 and the stage1 built compiler could
> be used to shorten the above for stage2 and stage3?
ah yes this would work and likely reduce the number of rules.
> Likewise it might be feasible to provide a --with-system-gm2?
sure I will look into this
> Anyway, I can't spot any obvious issues in this file (but it's large).
I think it might also be shortened by changing the bootstrap tool mc to
only use generic rules (and avoid using the --extended-opaque specific rules)
> I think exposing this to a wider audience
> earlier is most important at this point.
>
> Thus OK.
great news thanks!
regards,
Gaius
prev parent reply other threads:[~2022-11-11 22:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 15:31 Gaius Mulley
2022-11-11 13:56 ` Richard Biener
2022-11-11 22:55 ` Gaius Mulley [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mt8x3xtw.fsf@debian \
--to=gaiusmod2@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.guenther@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).