[gcc/devel/modula-2] Bugfix ensure that the scaffold source is kept if -fmakeinit present.
Gaius Mulley
gaius@gcc.gnu.org
Wed Mar 2 18:47:24 GMT 2022
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\
}"
More information about the Gcc-cvs
mailing list