public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/modula-2] Bugfix ensure that the scaffold source is kept if -fmakeinit present.
@ 2022-03-02 18:47 Gaius Mulley
0 siblings, 0 replies; only message in thread
From: Gaius Mulley @ 2022-03-02 18:47 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:8df4f2c9f53f43d59ccdb2ce3af180645ead8fa4
commit 8df4f2c9f53f43d59ccdb2ce3af180645ead8fa4
Author: q <gaius.mulley@southwales.ac.uk>
Date: Wed Mar 2 18:46:13 2022 +0000
Bugfix ensure that the scaffold source is kept if -fmakeinit present.
gcc/ChangeLog:
* m2/m2-link-support.h (GEN_SCAFFOLD_SRC): New definition.
(M2LINK) use GEN_SCAFFOLD_SRC to generate the scaffold name.
Signed-off-by: <gaius.mulley@southwales.ac.uk>
Diff:
---
gcc/m2/m2-link-support.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/gcc/m2/m2-link-support.h b/gcc/m2/m2-link-support.h
index a154e407cf1..eb52f2b4f0d 100644
--- a/gcc/m2/m2-link-support.h
+++ b/gcc/m2/m2-link-support.h
@@ -168,6 +168,13 @@ along with GCC; see the file COPYING3. If not see
#define GM2(INPUT,OUTPUT) CC1GM2 " -o " OUTPUT " " INPUT
+/* GEN_SCAFFOLD_SRC generates the string SCAFFOLDNAME ".cpp"
+ marking it for deletion if -fmakeinit is absent. */
+
+#define GEN_SCAFFOLD_SRC \
+ "%{fmakeinit:" SCAFFOLDNAME ".cpp;:" \
+ SCAFFOLDNAME "%d.cpp}"
+
/* M2LINK compile main module (providing absense of -fonlylink)
and link all project dependent modules. */
@@ -177,7 +184,7 @@ along with GCC; see the file COPYING3. If not see
%{!fuselist:" GM2L("%i"," -o %g.l ") " \n\
" GM2LORDER("%g.l","%g.lst") " \n\
" GM2LGEN("%{fuselist:%b.lst;:%g.lst}",\
- "%{g:{!fmakeinit:%d}" SCAFFOLDNAME ".cpp;:%g.cpp}",\
+ GEN_SCAFFOLD_SRC,\
"%d" SCAFFOLDNAME "%O") "}}\n\
}"
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-02 18:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-02 18:47 [gcc/devel/modula-2] Bugfix ensure that the scaffold source is kept if -fmakeinit present Gaius Mulley
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).