PR-108135 Remove PACKAGE_* definitions from gm2config.h
authorGaius Mulley <gaiusmod2@gmail.com>
Thu, 26 Jan 2023 00:55:56 +0000 (00:55 +0000)
committerGaius Mulley <gaiusmod2@gmail.com>
Thu, 26 Jan 2023 00:55:56 +0000 (00:55 +0000)
commit66132b1f213c2907512259cd0197ef49a74897b9
treec48d561419557ff21ca092618fbd7523366c58fa
parent9bb6515b10c51a07436577d0eb73531ba279ffa4
PR-108135 Remove PACKAGE_* definitions from gm2config.h

PR-108135 gcc/m2/configure generates gm2config.h and
automatically adds PACKAGE defines.  gcc/m2/Make-lang.in
now removes these PACKAGE definitions.  The patch also
contains fixes to remove an unused variable Dim from
BuildConstHighFromSym and also uses withTok in StartBuildWith.
StartBuildWith will generate a nop (for improved debugging)
if requested.

gcc/m2/ChangeLog:

* Make-lang.in (m2/gm2config.h): Rewrite rule to be
dependent upon m2/gm2config.aci.
(m2/gm2config.aci): Newrule.
* configure.ac (AC_CONFIG_HEADERS): Change destination
to gm2config.aci.
* configure: Regenerate.
* gm2-libs/config-host: Regenerate.
* gm2-compiler/M2GCCDeclare.mod (AddSymToWatch): Comment
out.
* gm2-compiler/M2Quads.mod (BuildConstHighFromSym): Remove
Dim.
(StartBuildWith): Call BuildStmtNoteTok.
(BuildStmtNoteTok): New procedure.
(BuildStmtNote): Re-implement re-factor into two
procedures and call BuildStmtNoteTok.
* gm2config.h.in: Remove.
* gm2config.aci.in: New file.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
gcc/m2/Make-lang.in
gcc/m2/configure
gcc/m2/configure.ac
gcc/m2/gm2-compiler/M2GCCDeclare.mod
gcc/m2/gm2-compiler/M2Quads.mod
gcc/m2/gm2-libs/config-host
gcc/m2/gm2config.aci.in [moved from gcc/m2/gm2config.h.in with 96% similarity]