Fixes to allow -fcpp and regression test link changes.
This patch fixes (re-introduces) the -fcpp option and it
migrates more testsuite tcl files to use the new linking mechanism.
2022-06-26 Gaius Mulley <gaius.mulley@southwales.ac.uk>
gcc/m2/ChangeLog:
* bnf/gm2l.bnf (ScanArgs): -fcppbegin changed to -fcpp-begin.
* gm2-compiler/M2DriverOptions.mod (ScanCppArgs):
-fcppbegin changed to -fcpp-begin, -fcppend changed to
-fcpp-end.
* gm2-compiler/M2GenGCC.mod (CodeFinallyEnd): Check
we are compiling the main module before generating
the scaffold.
* gm2-compiler/M2Options.mod (CppRemember): -fcppbegin
changed to -fcpp-begin. (CppArg) -fcppbegin
changed to -fcpp-begin, -fcppend changed to -fcpp-end.
-fcppprog changed to -fcpp-prog.
* gm2-compiler/P2SymBuild.mod (BlockEnd): Added assert.
(PopBlock) bug fix, curModuleSym is popped in
correct sequence.
* gm2-lang.cc (gm2_langhook_init_options):
-fcppbegin changed to -fcpp-begin. -fcppend changed to
-fcpp-end. -fcppprog changed to -fcpp-prog.
* gm2spec.cc (get_libexec): New function.
(gen_gm2_libexec) New function. (add_exec_dir) New function.
(lang_register_spec_functions) add exec_prefix.
* lang-specs.h: -fcppbegin changed to -fcpp-begin.
-fcppend changed to -fcpp-end.
* lang.opt: Uniform internal switch statement used
where necessary. -fcppbegin changed to -fcpp-begin.
-fcppend changed to -fcpp-end. -fcppprog= changed to -fcpp-prog=.
libgm2/Changelog:
* libm2iso/m2rts.h: (New file).
Signed-off-by: Gaius Mulley <gaius.mulley@southwales.ac.uk>