From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1499) id B5C97385842C; Wed, 2 Mar 2022 18:47:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B5C97385842C Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Gaius Mulley To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/modula-2] Bugfix ensure that the scaffold source is kept if -fmakeinit present. X-Act-Checkin: gcc X-Git-Author: q X-Git-Refname: refs/heads/devel/modula-2 X-Git-Oldrev: 7714b511fceb9b519235e9a3130c77268d0c49c7 X-Git-Newrev: 8df4f2c9f53f43d59ccdb2ce3af180645ead8fa4 Message-Id: <20220302184724.B5C97385842C@sourceware.org> Date: Wed, 2 Mar 2022 18:47:24 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Mar 2022 18:47:24 -0000 https://gcc.gnu.org/g:8df4f2c9f53f43d59ccdb2ce3af180645ead8fa4 commit 8df4f2c9f53f43d59ccdb2ce3af180645ead8fa4 Author: q 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: 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\ }"