gcc/gm2tools
Gaius Mulley 33abd43d4c Static scaffold fixes, gm2l tidyup.
This patch fixes many static scaffold bugs and contains
a re-implementation of UnixArgs.cc and termios.cc.  gm2l
contains new options --exlude=, --include= and -flibs=.

2022-07-04  Gaius Mulley  <gaius.mulley@southwales.ac.uk>

gcc/ChangeLog:

	* doc/gm2.texi (-fscaffold-c): Removed.  (-fscaffold-c++)
	Removed.  (-fmodules) Removed.  (-fonlylink) Removed.

gcc/m2/ChangLog:

	* Make-lang.in (UnixArgs.o): Use UnixArgs.cc.
	(gm2-pge-boot/Gtermsios.o) Use mc-boot-ch/Gtermios.cc.
	* bnf/gm2l.bnf: Partial re-write and introduced
	--include=, --exclude= and -flibs=.  (AddUserInclude)
	New procedure.  (ScanSources) Remove IncludeM2RTS
	filter.  (MakeModule) Return a boolean if a new module
	is seen.  (source) New field userInclude.
	(source) New field userExclude.  (DisplaySources)
	test for userExclude and userInclude and produce
	appropriate diagnostic.  (DisplayUsage) Remove
	--M2RTS.  Add -flibs=, --include-list= and --exclude-list=.
	(PopulateList) New procedure.  (addInclude) New procedure.
	(SetLibs) New procedure.  (SetExclude) New procedure.
	(ScanArgs) Remove IncludeM2RTS.  Remove --M2RTS.
	Add --include=, --exclude= and -flibs=.  Detect if multiple
	source files are given and detect any unrecognized option.
	* bnf/gm2m.bnf (main): Renamed as mainModule.
	* gm2-compiler/M2Options.mod (SetScaffoldDynamic): Ensure that
	ScaffoldStatic is not also set.  (SetScaffoldStatic) Ensure
	that ScaffoldDynamic is not also set.
	* gm2-compiler/M2Quads.mod (BuildM2FiniFunction):
	Add ForeachModuleCallFinish for the static clause.
	(BuildM2InitFunction) Add ForeachModuleCallInit for the
	static clause.
	* gm2-compiler/M2Scaffold.def (ForeachModuleCallInit):
	New procedure.  (ForeachModuleCallFinish) New Procedure.
	* gm2-compiler/M2Scaffold.mod (ForeachModuleCallInit):
	New procedure implemented.  (ForeachModuleCallFinish) New
	Procedure implemented.  (LookupModuleSym) New procedure.
	(ReadModules) Addition parameter tok and populate
	uselistModules.  (DeclareModuleExtern) Renamed from
	DeclareCtorModuleExtern.
	* gm2-compiler/M2Swig.mod (main): Renamed as mainModule.
	* gm2-compiler/SymbolTable.def (PutModuleCtorExtern): Exported
	and declared.  (MakeModuleCtor) Pass extra boolean public true.
	(InitCtorFields) pub new parameter.  (PutProcedureExternPublic)
	New procedure.  (PutCtorExtern) New procedure.
	(PutModuleCtorExtern) New procedure.
	* gm2-gcc/init.cc: Rewritten to pass envp to call init and fini
	functions.
	* gm2-gcc/m2expr.def: FOR "C" removed.
	* gm2-libs-ch/RTcodummy.c: Undo removal of _init and _finish
	functions.
	* gm2-libs-ch/pthdummy.c (Removed).
	* m2/gm2spec.cc (seen_scaffold_static): New boolean.
	(seen_scaffold_dynamic) New boolean.  (scaffold_static)
	New boolean.  (scaffold_dynamic) New boolean.
	(get_libexec) Removed.  (add_exec_dir) Rewritten comment.
	(lang_specific_driver) Check that dynamic scaffold and static
	scaffold are not both enabled.
	* mc-boot-ch/Gpth.c (Removed).
	* mc-boot-ch/Gtermios.c (Removed).
	* mc-boot-ch/Gtermios.cc (Added).  Converted from Gtermios.c.

gm2tools/ChangeLog:

	* gm2l.1 (--M2RTS) Removed.  (-M2RTS) Removed.  (--include=) Added.
	(--exclude=) Added.  (-flibs=) Added.

libgm2/ChangeLog:

	* libm2iso/ErrnoCategory.cc (_finish): Changed to _fini.
	* libm2iso/RTco.cc (_finish): Changed to _fini.
	* libm2pim/SysExceptions.cc (_finish): Changed to _fini.
	* libm2pim/errno.cc (_finish): Changed to _fini.
	* libm2pim/termios.cc (_finish): Changed to _fini.

Signed-off-by: Gaius Mulley <gaius.mulley@southwales.ac.uk>
2022-07-05 14:15:16 +01:00
..
aclocal.m4 Rebuilt Makefile.in's using automake-1.15.1 and configure using autoconf-2.69. 2021-08-14 09:21:52 +01:00
autogen.sh Tidy up dates and correct spelling in documentation. 2022-05-18 13:01:24 +01:00
ChangeLog gm2tools/ChangeLog corrected to use GNU formatting. 2022-05-18 21:34:42 +01:00
configure Rebuilt Makefile.in's using automake-1.15.1 and configure using autoconf-2.69. 2021-08-14 09:21:52 +01:00
configure.ac Tidy up dates and correct spelling in documentation. 2022-05-18 13:01:24 +01:00
errors.c Tidy up dates and correct spelling in documentation. 2022-05-18 13:01:24 +01:00
gm2l.1 Static scaffold fixes, gm2l tidyup. 2022-07-05 14:15:16 +01:00
gm2lcc.1
gm2lgen.1
gm2lorder.1
m2color.c gm2tools/m2color.c reformatted to use GNU coding standards. 2022-05-18 16:15:44 +01:00
Makefile.am Tidy up dates and correct spelling in documentation. 2022-05-18 13:01:24 +01:00
Makefile.in PR-105410 Bugfix implement save-temps across every temporary file. 2022-05-04 15:24:18 +01:00