Skip to content
Snippets Groups Projects
Commit 573dbd51 authored by Gaius Mulley's avatar Gaius Mulley
Browse files

PR modula2/107630 Remove M2LINK and remove some cross linking


Remove M2LINK.def.  Pass the user forced module initialization string as
a parameter to M2RTS.ConstructModules.  This patch allows
-fm2-whole-program to link successfully using dynamic libraries.

gcc/m2/ChangeLog:

	PR modula2/107630
	* Make-lang.in (m2/stage2/cc1gm2$(exeext)): Remove
	m2/gm2-libs-boot/M2LINK.o.
	(m2/stage1/cc1gm2$(exeext)): Ditto.
	(GM2-LIBS-BOOT-DEFS): Remove M2LINK.def.
	(GM2-LIBS-DEFS): Ditto.
	(m2/mc-boot/$(SRC_PREFIX)%.o): Replace CXX_FLAGS with CXXFLAGS.
	(m2/mc-boot-ch/$(SRC_PREFIX)%.o): Ditto.
	(m2/mc-boot/main.o): Ditto.
	(mcflex.o): Add $(CFLAGS).
	(m2/gm2-libs-boot/M2LINK.o): Remove rule.
	* gm2-compiler/M2GCCDeclare.def (DeclareM2linkGlobals): Remove.
	* gm2-compiler/M2GCCDeclare.mod: (M2LinkEntry): Remove.
	(M2LinkIndex): Remove.
	(DoVariableDeclaration): Remove initial and call to
	AddEntryM2Link.
	(AddEntryM2Link): Remove.
	(GetEntryM2Link): Remove.
	(DeclareM2linkGlobals): Remove.
	(DetectM2LinkInitial): Remove.
	(InitM2LinkModule): Remove.
	* gm2-compiler/M2GenGCC.mod (CodeFinallyEnd): Remove call to
	DeclareM2linkGlobals.
	* gm2-compiler/M2Quads.mod (BuildM2InitFunction): Add extra
	parameter containing runtime module override to ConstructModules.
	* gm2-compiler/M2Scaffold.mod: Update comment describing
	ConstructModules.
	* gm2-gcc/m2decl.cc (m2decl_DeclareM2linkForcedModuleInitOrder):
	Remove.
	* gm2-libs-iso/M2RTS.def (ConstructModules): Add overrideliborder
	parameter.
	* gm2-libs-iso/M2RTS.mod: Add overrideliborder parameter.
	* gm2-libs/M2Dependent.def (ConstructModules): Add overrideliborder
	parameter.
	* gm2-libs/M2Dependent.mod (ConstructModules): Add overrideliborder
	parameter.
	* gm2-libs/M2RTS.def (ConstructModules): Add overrideliborder parameter.
	* gm2-libs/M2RTS.mod (ConstructModules): Add overrideliborder
	parameter.
	* gm2-libs/M2LINK.def: Removed.

libgm2/ChangeLog:

	* libm2pim/Makefile.am (M2DEFS): Remove M2LINK.def.
	* libm2pim/Makefile.in: Rebuild.

Signed-off-by: default avatarGaius Mulley <gaiusmod2@gmail.com>
parent 03178527
No related branches found
No related tags found
No related merge requests found
Showing with 73 additions and 245 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment