GCC Administrator
829d597548
Daily bump.
2023-06-03 00:16:48 +00:00
Thomas Schwinge
49153588ab
Remove stale Autoconf checks for Perl
...
Subversion r110220 (Git commit 03b8fe495d
) for
PR25884 "libgomp should not require perl to compile" removed all '$(PERL)'
usage from libgomp -- but didn't remove the then-unused Autoconf Perl check
itself. Later, this Autoconf Perl check appears to have been copied from
libgomp into other GCC libraries, likewise unused.
libgomp/
* configure.ac (PERL): Remove.
* configure: Regenerate.
* Makefile.in: Likewise.
* testsuite/Makefile.in: Likewise.
libatomic/
* configure.ac (PERL): Remove.
* configure: Regenerate.
* Makefile.in: Likewise.
* testsuite/Makefile.in: Likewise.
libgm2/
* configure.ac (PERL): Remove.
* configure: Regenerate.
* Makefile.in: Likewise.
* libm2cor/Makefile.in: Likewise.
* libm2iso/Makefile.in: Likewise.
* libm2log/Makefile.in: Likewise.
* libm2min/Makefile.in: Likewise.
* libm2pim/Makefile.in: Likewise.
libitm/
* configure.ac (PERL): Remove.
* configure: Regenerate.
* Makefile.in: Likewise.
* testsuite/Makefile.in: Likewise.
2023-06-02 09:51:14 +02:00
GCC Administrator
0d56605751
Daily bump.
2023-05-17 00:17:44 +00:00
Gaius Mulley
509eef9314
PR modula2/109879 WholeIO.ReadCard and ReadInt should consume leading space
...
The Read{TYPE} procedures in LongIO, LongWholeIO, RealIO, ShortWholeIO and
WholeIO all require skip space functionality. A new module TextUtil
is supplied with this functionality and the previous modules have been
changed to call SkipSpaces.
gcc/m2/ChangeLog:
PR modula2/109879
* gm2-libs-iso/LongIO.mod (ReadReal): Call SkipSpaces.
* gm2-libs-iso/LongWholeIO.mod (ReadInt): Call SkipSpaces.
(ReadCard): Call SkipSpaces.
* gm2-libs-iso/RealIO.mod (ReadReal): Call SkipSpaces.
* gm2-libs-iso/ShortWholeIO.mod: (ReadInt): Call SkipSpaces.
(ReadCard): Call SkipSpaces.
* gm2-libs-iso/TextIO.mod: Import SkipSpaces.
* gm2-libs-iso/WholeIO.mod (ReadInt): Call SkipSpaces.
(ReadCard): Call SkipSpaces.
* gm2-libs-iso/TextUtil.def: New file.
* gm2-libs-iso/TextUtil.mod: New file.
libgm2/ChangeLog:
PR modula2/109879
* Makefile.in: Regenerate.
* aclocal.m4: Regenerate.
* libm2cor/Makefile.in: Regenerate.
* libm2iso/Makefile.am (M2DEFS): Add TextUtil.def.
(M2MODS): Add TextUtil.mod.
* libm2iso/Makefile.in: Regenerate.
* libm2log/Makefile.in: Regenerate.
* libm2min/Makefile.in: Regenerate.
* libm2pim/Makefile.in: Regenerate.
gcc/testsuite/ChangeLog:
PR modula2/109879
* gm2/isolib/run/pass/testreadint.mod: New test.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-05-17 00:18:56 +01:00
Gaius Mulley
cf4dcfa672
PR modula2/108344 disable default opening of /dev/tty
...
This patch changes removes the static initialisation code for KeyBoardLEDs.cc.
The module is only initialised if one of the exported functions is called.
This is useful as the module will access /dev/tty which might not be
available. TimerHandler.mod has also been changed to disable the scroll
lock LED as a sign of life.
gcc/m2/ChangeLog:
PR modula2/108344
* gm2-libs-coroutines/TimerHandler.mod (EnableLED): New constant.
(Timer): Test EnableLED before switching on the scroll LED.
libgm2/ChangeLog:
PR modula2/108344
* libm2cor/KeyBoardLEDs.cc (initialize_module): New function.
(SwitchScroll): Call initialize_module.
(SwitchNum): Call initialize_module.
(SwitchCaps): Call initialize_module.
(SwitchLEDs): Call initialize_module.
(M2EXPORT): Remove initialization code.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-05-16 15:51:53 +01:00
GCC Administrator
c34cede1f2
Daily bump.
2023-05-14 00:16:39 +00:00
Gaius Mulley
2415442489
Replace bool as boolean instead of int in libgm2
...
This patch tidies KeyBoardLEDs.cc, RTco.cc, sckt.cc
and wrapc.cc by removing the TRUE/FALSE macros and using
bool, true and false.
libgm2/ChangeLog:
* libm2cor/KeyBoardLEDs.cc (TRUE): Remove.
(FALSE): Remove.
(init): Replace TRUE with true.
* libm2iso/RTco.cc (TRUE): Remove.
(FALSE): Remove.
(initSem): Replace int with bool.
(init): Replace FALSE with false.
* libm2pim/sckt.cc (TRUE): Remove.
(FALSE): Remove.
* libm2pim/wrapc.cc: Replace TRUE with true
and FALSE with false.
(FALSE): Remove.
(TRUE): Remove.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-05-13 15:49:50 +01:00
GCC Administrator
212905a47d
Daily bump.
2023-05-09 00:16:43 +00:00
Thomas Schwinge
bd6dbdb196
libgm2: Remove 'autogen.sh'
...
... given that plain 'autoreconf' achieves the same.
libgm2/
* autogen.sh: Remove.
2023-05-08 15:53:47 +02:00
Thomas Schwinge
8b8a4fb8ef
libgm2: Adjust 'autogen.sh' to 'ACLOCAL_AMFLAGS', and simplify
...
Specifying explicit '-I ..' before '-I ../config' is what (most) other GCC
components do. Specifying '-I .' is not necessary.
With the order of '-I's aligned, 'autogen.sh' and plain 'autoreconf' then
produce identical results.
libgm2/
* autogen.sh: For 'aclocal', 'autoreconf', remove '-I .',
add '-I ..'.
* Makefile.am (ACLOCAL_AMFLAGS): Remove '-I .'.
* libm2cor/Makefile.am (ACLOCAL_AMFLAGS): Likewise.
* libm2iso/Makefile.am (ACLOCAL_AMFLAGS): Likewise.
* libm2log/Makefile.am (ACLOCAL_AMFLAGS): Likewise.
* libm2min/Makefile.am (ACLOCAL_AMFLAGS): Likewise.
* libm2pim/Makefile.am (ACLOCAL_AMFLAGS): Likewise.
* aclocal.m4: Regenerate.
* Makefile.in: Likewise.
* libm2cor/Makefile.in: Likewise.
* libm2iso/Makefile.in: Likewise.
* libm2log/Makefile.in: Likewise.
* libm2min/Makefile.in: Likewise.
* libm2pim/Makefile.in: Likewise.
2023-05-08 15:51:59 +02:00
GCC Administrator
50bd9c41d5
Daily bump.
2023-03-23 00:17:30 +00:00
Gaius Mulley
573dbd5175
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: Gaius Mulley <gaiusmod2@gmail.com>
2023-03-22 01:45:58 +00:00
GCC Administrator
5c389a5c36
Daily bump.
2023-03-17 00:17:03 +00:00
Gaius Mulley
77924dff14
PR 107630 runtime libs should be self-contained
...
This is a patch to improve the layering of libgm2.
It removes the m2cor Debug.{def,mod} (the codebase will use
m2pim Debug instead). It also layers SysStorage under
both m2pim Storage and m2iso Storage. SysStorage is now
a dependant of m2pim Storage.mod. Halt parameters for
Debug.mod and M2RTS.mod now have the same order.
gcc/m2/ChangeLog:
* gm2-compiler/SymbolKey.mod (PutSymKey): Halt parameters
reordered.
(DelSymKey): Ditto.
* gm2-compiler/ppg.mod (GetEpsilon): Ditto.
(GetReachEnd): Ditto.
(GetFollow): Ditto.
(CodeCondition): Ditto.
(CodeThenDo): Ditto.
(CodeEnd): Ditto.
(RecoverCondition): Ditto.
(ConditionIndent): Ditto.
* gm2-libs-ch/m2rts.h (M2RTS_Halt): Ditto.
* gm2-libs-coroutines/Executive.mod (Assert): Ditto.
(Resume): Remove redundant comments.
(Wait): Remove redundant comments.
* gm2-libs-coroutines/SYSTEM.mod (TRANSFER): Halt parameters
reordered.
(IOTransferHandler): Ditto.
(Finished): Ditto.
(localInit): Ditto.
* gm2-libs-coroutines/TimerHandler.mod (WaitOn): Halt parameters
reordered.
(Cancel): Ditto.
(ReArmEvent): Ditto.
(OnActiveQueue): Ditto.
* gm2-libs-iso/COROUTINES.mod (NEWCOROUTINE): Ditto.
(Transfer): Ditto.
(IOTRANSFER): Ditto.
* gm2-libs-iso/EXCEPTIONS.mod (RAISE): Correct Halt parameters.
* gm2-libs-iso/M2RTS.def (Halt): Halt parameters reordered.
(HaltC): Ditto.
* gm2-libs-iso/M2RTS.mod: Ditto.
* gm2-libs-iso/RTentity.mod (PutKey): Ditto.
(DelKey): Ditto.
(findChildAndParent): Ditto.
(assert): Ditto.
* gm2-libs-iso/Storage.mod (ALLOCATE): Add DebugTrace.
Add UseMallocFree test.
(DEALLOCATE): Add DebugTrace. Add UseMallocFree test.
(assert): Halt parameters reordered.
* gm2-libs-log/Termbase.mod (Read): Ditto.
(KeyPressed): Ditto.
(Write): Ditto.
(Init): Ditto.
* gm2-libs/Debug.def (Halt): Halt parameters reordered.
* gm2-libs/Debug.mod (Halt): Ditto.
* gm2-libs/DynamicStrings.def (PopAllocation): Improve comment.
* gm2-libs/DynamicStrings.mod (PopAllocation): Improve comment.
Halt parameters reordered.
* gm2-libs/M2RTS.def (Halt): Ditto.
(HaltC): Ditto.
* gm2-libs/M2RTS.mod (Halt): Ditto.
(HaltC): Ditto.
* gm2-libs/PushBackInput.mod (PutStr): Ditto.
(PutString): Ditto.
(PutCh): Ditto.
* gm2-libs/RTExceptions.mod (GetBaseExceptionBlock): Ditto.
* gm2-libs/RTint.mod (ReArmTimeVector): Ditto.
(GetTimeVector): Ditto.
(AttachVector): Ditto.
(IncludeVector): Ditto.
(Listen): Ditto.
* gm2-libs/SysStorage.mod (ALLOCATE): Ditto.
(DEALLOCATE): Ditto.
(REALLOCATE): Ditto.
* gm2-libs-coroutines/Debug.def: Removed.
* gm2-libs-coroutines/Debug.mod: Removed.
libgm2/ChangeLog:
* libm2cor/Makefile.am: Remove
* libm2cor/Makefile.in: Rebuild.
* libm2iso/RTco.cc (newSem): Halt parameters reordered.
(currentThread): Ditto.
(never): Ditto.
(defined): Ditto.
(initThread): Ditto.
* libm2iso/m2rts.h (m2iso_M2RTS_HaltC): Ditto.
gcc/testsuite/ChangeLog:
* gm2/complex/pass/arith3.mod: Halt parameters reordered.
* gm2/complex/run/pass/arith3.mod: Ditto.
* gm2/complex/run/pass/arith4.mod: Ditto.
* gm2/complex/run/pass/arith5.mod: Ditto.
* gm2/isolib/run/pass/real2.mod: Ditto.
* gm2/isolib/run/pass/real3.mod: Ditto.
* gm2/isolib/run/pass/realconv.mod: Ditto.
* gm2/isolib/run/pass/realconv2.mod: Ditto.
* gm2/pim/pass/testshort.mod: Ditto.
* gm2/projects/pim/run/pass/tower/AdvSystem.mod: Ditto.
* gm2/projects/pim/run/pass/tower/DrawL.mod: Ditto.
* gm2/warnings/returntype/pass/Termbase.mod: Ditto.
* gm2/warnings/returntype/pass/keypressedsimple.mod: Ditto.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-03-16 20:34:32 +00:00
GCC Administrator
39b1814c02
Daily bump.
2023-03-16 00:16:56 +00:00
Gaius Mulley
8f1711ef34
PR 109125 13 regression SIGBUS in m2pim_ldtoa_ldtoa
...
This patch fixes more bool int parameter mismatches
found in dtoa and ldtoa.
gcc/m2/ChangeLog:
PR modula2/109125
* gm2-libs-ch/dtoa.cc (dtoa_strtod): Replace int with bool.
* gm2-libs-ch/ldtoa.cc (ldtoa_strtold): Replace int with bool.
libgm2/ChangeLog:
PR modula2/109125
* libm2pim/dtoa.cc (TRUE): Remove.
(FALSE): Remove. Replace int with bool.
* libm2pim/ldtoa.cc (TRUE): Remove.
(FALSE): Remove. Replace int with bool.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-03-15 21:30:33 +00:00
GCC Administrator
fd42a8fa4b
Daily bump.
2023-03-15 00:16:58 +00:00
Gaius Mulley
19c5dfc29d
PR 109125 Modula2 SIGBUS in m2pim_ldtoa_ldtoa
...
13 regression failures seen on sparc SIGBUS in m2pim_ldtoa_ldtoa.
This patch fixes int bool parameter mismatches between the
definition modules and their C/C++ implementations.
gcc/m2/ChangeLog:
PR modula2/109125
* gm2-libs-ch/cgetopt.c (cgetopt_SetOption): Replace int
for bool.
* gm2-libs-ch/termios.c (doSetUnset): Replace int for bool.
* gm2-libs/Builtins.mod (isfinitef): Correct typo in return
statement.
libgm2/ChangeLog:
PR modula2/109125
* libm2iso/ErrnoCategory.cc (FALSE): Remove.
(TRUE): Remove.
* libm2iso/wrapsock.c (TRUE): Remove.
(FALSE): Remove.
* libm2iso/wraptime.cc (TRUE): Remove.
(FALSE): Remove.
* libm2pim/cgetopt.cc: Replace int for bool for every BOOLEAN
parameter in the definition module.
* libm2pim/dtoa.cc: Ditto.
* libm2pim/ldtoa.cc: Ditto.
* libm2pim/termios.cc: Ditto.
(doSetUnset): Replace int for bool.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-03-14 19:52:11 +00:00
GCC Administrator
bf0e0fc0ea
Daily bump.
2023-02-28 00:18:40 +00:00
Gaius Mulley
e5fcf084e3
libgm2/libm2pim/sckt.cc:254:3: warning: memset() called to fill 0 bytes [PR108944]
...
The pattern parameter to memset is second. Correct an obvious mistake
in libm2pim/sckt.cc.
libgm2/ChangeLog:
PR modula2/108944
* libm2pim/sckt.cc (getLocalIP): Correct parameter order.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-02-27 16:29:18 +00:00
GCC Administrator
94341f0baa
Daily bump.
2023-02-26 00:17:15 +00:00
Gaius Mulley
05652ac4e8
modula-2 module registration process seems to fail with shared libraries [PR108261]
...
The commit adds pathnames to modula-2 which in turn appears in any
external symbol. This is necessary to allow different dialects of
libraries to coexist (different implementations of SYSTEM and Storage
for example in libm2pim and libm2iso). It also makes it easier to
debug as the library name forms part of the external mangled name.
By default pathnames are not user facing. This commit fixes
PR108261.
gcc/ChangeLog:
PR modula2/108261
* doc/gm2.texi (-fm2-pathname): New option documented.
(-fm2-pathnameI): New option documented.
(-fm2-prefix=): New option documented.
(-fruntime-modules=): Update default module list.
gcc/m2/ChangeLog:
PR modula2/108261
* Make-lang.in (GM2-COMP-BOOT-DEFS): DynamicStringPath.def
remove. DynamicPath.def add.
(GM2-COMP-BOOT-MODS): DynamicStringPath.mod remove.
DynamicPath.mod add.
* Make-maintainer.in (BUILD-BOOT-PPG-H): New dependency.
(m2/gm2-ppg-boot/$(SRC_PREFIX)%.o): $(BUILD-BOOT-PPG-H) Add
dependency.
(PGE-DEF): New definition.
(BUILD-BOOT-PG-H): New dependency.
(m2/gm2-pg-boot/$(SRC_PREFIX)%.o): $(BUILD-BOOT-PG-H) Add
dependency.
(BUILD-BOOT-PGE-H): New dependency.
(m2/gm2-pge-boot/$(SRC_PREFIX)%.o): $(BUILD-BOOT-PGE-H) Add
dependency.
(GM2PATH): Add pathname entries.
(m2/boot-bin/mc-devel$(exeext)): Add m2/mc-boot-ch/Gm2rtsdummy.o
dependency.
(m2/boot-bin/mc-opt$(exeext)): Fix -I path.
* gm2-compiler/DynamicStringPath.def: Renamed module to
DynamicPath.
(GetUserPath): Remove.
(GetSystemPath): Remove.
(SetUserPath): Remove.
(SetSystemPath): Remove.
(DumpPath): New procedure definition.
* gm2-compiler/DynamicStringPath.mod: Renamed module to
DynamicPath.
(GetUserPath): Remove.
(GetSystemPath): Remove.
(SetUserPath): Remove.
(SetSystemPath): Remove.
(DumpPath): Remove Debugging conditional.
* gm2-compiler/M2AsmUtil.mod: Import EqualArray, NulName and
GetLibName.
(Debugging): New declaration.
(GetFullSymName): Re-implemented to prefix (mange) libname
to any extern variable/procedure which is IsExportQualified.
* gm2-compiler/M2Comp.mod (qprintLibName): New procedure.
* gm2-compiler/M2Graph.mod (resolveImports): Add libname.
* gm2-compiler/M2Options.def (SetM2Prefix): New procedure.
(GetM2Prefix): New procedure function.
(SetM2PathName): New procedure.
(GetM2PathName): New procedure function.
* gm2-compiler/M2Options.mod: (SetM2Prefix): New procedure implemented.
(GetM2Prefix): New procedure function implemented.
(SetM2PathName): New procedure implemented.
(GetM2PathName): New procedure function implemented.
(RuntimeModuleOverride): Set to DefaultRuntimeModuleOverride.
* gm2-compiler/M2Quads.mod: Import GetLibName.
(SafeRequestSym) Pass result of GetLibName to RequestDependant.
(callRequestDependant): Add libname as a parameter.
(BuildM2InitFunction): Add libname as a parameter.
(BuildM2FiniFunction): Add libname as a parameter.
(BuildM2CtorFunction): Add libname as a parameter.
* gm2-compiler/M2Scaffold.mod (LookupModuleSym): Set LibName
if a definition source was found.
* gm2-compiler/M2Search.def (FindSourceFile): Add named library parameter.
(FindSourceDefFile): Add named library parameter.
(FindSourceModFile): Add named library parameter.
* gm2-compiler/M2Search.mod (FindSourceFile): Reimplement.
(FindSourceDefFile): Add named library parameter.
(FindSourceModFile): Add named library parameter.
* gm2-compiler/SymbolTable.def (MakeProcedureCtorExtern): Add
libname parameter.
(PutLibName): New procedure.
(GetLibName): New procedure function.
* gm2-compiler/SymbolTable.mod (MakeProcedureCtorExtern): Add
libname parameter.
(GenName): Add libname parameter.
(InitCtorFields): Add moduleSym as a parameter.
(PutCtorExtern): Add libname parameter to GenName.
* gm2-gcc/init.cc (_M2_DynamicStringPath_init): Rename function...
(_M2_DynamicPath_init): ...to this.
(_M2_PathName_init): Added.
* gm2-gcc/m2decl.cc (m2decl_DeclareM2linkStaticInitialization):
Add m2pim as the manged component of the exported symbol.
(m2decl_DeclareM2linkForcedModuleInitOrder): Add m2pim mangle prefix.
* gm2-gcc/m2options.h (M2Options_SetM2Prefix): New function.
(M2Options_GetM2Prefix): New function.
(M2Options_SetM2PathName): New function.
(M2Options_GetM2PathName): New function.
* gm2-lang.cc (push_back_Ipath): New function.
(add_one_import_path): New function.
(gm2_langhook_handle_option): Record -I component. Call
SetM2PathName when -fm2-pathname= is seen. Record -fm2-pathnameI
component. Call SetM2Prefix when -fm2-prefix= is seen.
(gm2_langhook_post_options): Iterative over pathname entries
and call SetM2PathName, SetSearchPath as appropriate.
* gm2-libs-iso/M2RTS.def (ConstructModules): Add libname parameter.
(DeconstructModules): Add libname parameter.
(RegisterModule): Add libname parameter.
(RequestDependant): Add libname parameter.
* gm2-libs-iso/M2RTS.mod (ConstructModules): Add libname parameter.
(DeconstructModules): Add libname parameter.
(RegisterModule): Add libname parameter.
(RequestDependant): Add libname parameter.
* gm2-libs-min/M2RTS.def (ConstructModules): Add libname parameter.
(DeconstructModules): Add libname parameter.
(RegisterModule): Add libname parameter.
(RequestDependant): Add libname parameter.
* gm2-libs-min/M2RTS.mod (ConstructModules): Add libname parameter.
(DeconstructModules): Add libname parameter.
(RegisterModule): Add libname parameter.
(RequestDependant): Add libname parameter.
* gm2-libs/M2Dependent.def (ConstructModules): Add libname parameter.
(DeconstructModules): Add libname parameter.
(RegisterModule): Add libname parameter.
(RequestDependant): Add libname parameter.
* gm2-libs/M2Dependent.mod (ConstructModules): Add libname parameter.
(DeconstructModules): Add libname parameter.
(RegisterModule): Add libname parameter.
(RequestDependant): Add libname parameter.
* gm2-libs/M2RTS.def (ConstructModules): Add libname parameter.
(DeconstructModules): Add libname parameter.
(RegisterModule): Add libname parameter.
(RequestDependant): Add libname parameter.
* gm2-libs/M2RTS.mod (ConstructModules): Add libname parameter.
(DeconstructModules): Add libname parameter.
(RegisterModule): Add libname parameter.
(RequestDependant): Add libname parameter.
* gm2-libs/RTint.mod (FindVector): Rename variables.
(initInputVector): Rename variables.
(initOutputVector): Rename variables.
(InitTimeVector): Rename variables.
(FindVectorNo): Rename variables.
(FindPendingVector): Rename variables.
(ReArmTimeVector): Rename variables.
(GetTimeVector): Rename variables.
(AttachVector): Rename variables.
(AttachVector): Rename variables.
(IncludeVector): Rename variables.
(ExcludeVector): Rename variables.
(AddFd): Rename variables.
(AddFd): Rename variables.
(DumpPendingQueue): Rename variables.
(stop): Remove.
(activatePending): Rename variables.
(Listen): Rename variables.
* gm2-libs/libc.def (snprintf): New function.
* gm2-libs/sckt.def: Change all exported identifiers to be
export qualified.
* gm2spec.cc (push_back_Ipath): New function.
(add_m2_I_path): New function.
(lang_specific_driver): Skip -fm2-pathname= and remember pathname.
Skip -I and record the path and current pathname. Call add_m2_I_path.
* lang-specs.h: Replace %{I*} with %{fm2-pathname*}.
* lang.opt (-fm2-pathname=): New entry.
(-fm2-pathname): New entry.
(-fm2-prefix=): New entry.
* mc-boot-ch/GUnixArgs.cc (_M2_UnixArgs_dep): New function.
(_M2_UnixArgs_ctor::_M2_UnixArgs_ctor): New method.
* mc-boot-ch/Glibc.c (libc_snprintf): New function.
* mc-boot-ch/m2rts.h (M2RTS_RequestDependant): Changed prototype.
(M2RTS_RegisterModule): Changed prototype.
* mc-boot/GDynamicStrings.c: Rebuild.
* mc-boot/GFIO.c: Rebuild.
* mc-boot/GIndexing.c: Rebuild.
* mc-boot/GM2Dependent.c: Rebuild.
* mc-boot/GM2Dependent.h: Rebuild.
* mc-boot/GM2EXCEPTION.c: Rebuild.
* mc-boot/GM2RTS.c: Rebuild.
* mc-boot/GM2RTS.h: Rebuild.
* mc-boot/GPushBackInput.c: Rebuild.
* mc-boot/GRTExceptions.c: Rebuild.
* mc-boot/GRTint.c: Rebuild.
* mc-boot/GStdIO.c: Rebuild.
* mc-boot/GStringConvert.c: Rebuild.
* mc-boot/GSysStorage.c: Rebuild.
* mc-boot/Gdecl.c: Rebuild.
* mc-boot/Gkeyc.c: Rebuild.
* mc-boot/Glibc.h: Rebuild.
* mc-boot/GmcComment.c: Rebuild.
* mc-boot/GmcComp.c: Rebuild.
* mc-boot/GmcDebug.c: Rebuild.
* mc-boot/GmcMetaError.c: Rebuild.
* mc-boot/GmcStack.c: Rebuild.
* mc-boot/GnameKey.c: Rebuild.
* mc-boot/GsymbolKey.c: Rebuild.
* pge-boot/GASCII.c: Rebuild.
* pge-boot/GArgs.c: Rebuild.
* pge-boot/GAssertion.c: Rebuild.
* pge-boot/GDebug.c: Rebuild.
* pge-boot/GDynamicStrings.c: Rebuild.
* pge-boot/GFIO.c: Rebuild.
* pge-boot/GIO.c: Rebuild.
* pge-boot/GIndexing.c: Rebuild.
* pge-boot/GLists.c: Rebuild.
* pge-boot/GM2Dependent.c: Rebuild.
* pge-boot/GM2Dependent.h: Rebuild.
* pge-boot/GM2EXCEPTION.c: Rebuild.
* pge-boot/GM2RTS.c: Rebuild.
* pge-boot/GM2RTS.h: Rebuild.
* pge-boot/GNameKey.c: Rebuild.
* pge-boot/GNumberIO.c: Rebuild.
* pge-boot/GOutput.c: Rebuild.
* pge-boot/GPushBackInput.c: Rebuild.
* pge-boot/GRTExceptions.c: Rebuild.
* pge-boot/GSFIO.c: Rebuild.
* pge-boot/GStdIO.c: Rebuild.
* pge-boot/GStorage.c: Rebuild.
* pge-boot/GStrCase.c: Rebuild.
* pge-boot/GStrIO.c: Rebuild.
* pge-boot/GStrLib.c: Rebuild.
* pge-boot/GSymbolKey.c: Rebuild.
* pge-boot/GSysExceptions.c (_M2_SysExceptions_finish): Rename this...
(_M2_SysExceptions_fini): ... to this.
* pge-boot/GSysStorage.c: Rebuild.
(_M2_SysStorage_finish): Rename this...
(_M2_SysStorage_fini): ... to this.
* pge-boot/GUnixArgs.cc: New file.
* pge-boot/Gbnflex.c (_M2_bnflex_finish): Rename this...
(_M2_bnflex_fini): ... to this.
* pge-boot/Gerrno.c (_M2_errno_finish): Rename this...
(_M2_errno_fini): ... to this.
* pge-boot/Glibc.c (libc_snprintf): New function.
* pge-boot/Glibc.h (libc_snprintf): New prototype.
* pge-boot/Gpge.c (_M2_pge_finish): Rename this...
(_M2_pge_fini): ... to this.
* pge-boot/Gtermios.cc (_M2_termios_finish): Rename this...
(_M2_termios_fini): ... to this.
* pge-boot/main.c (_M2_RTExceptions_finish): Rename this...
(_M2_RTExceptions_fini): ... to this.
(_M2_M2EXCEPTION_finish): Rename this...
(_M2_M2EXCEPTION_fini): ... to this.
(_M2_M2RTS_finish): Rename this...
(_M2_M2RTS_fini): ... to this.
(_M2_SysExceptions_finish): Rename this...
(_M2_SysExceptions_fini): ... to this.
(_M2_StrLib_finish): Rename this...
(_M2_StrLib_fini): ... to this.
(_M2_errno_finish): Rename this...
(_M2_errno_fini): ... to this.
(_M2_termios_finish): Rename this...
(_M2_termios_fini): ... to this.
(_M2_IO_finish): Rename this...
(_M2_IO_fini): ... to this.
(_M2_StdIO_finish): Rename this...
(_M2_StdIO_fini): ... to this.
(_M2_Debug_finish): Rename this...
(_M2_Debug_fini): ... to this.
(_M2_SysStorage_finish): Rename this...
(_M2_SysStorage_fini): ... to this.
(_M2_Storage_finish): Rename this...
(_M2_Storage_fini): ... to this.
(_M2_StrIO_finish): Rename this...
(_M2_StrIO_fini): ... to this.
(_M2_DynamicStrings_finish): Rename this...
(_M2_DynamicStrings_fini): ... to this.
(_M2_Assertion_finish): Rename this...
(_M2_Assertion_fini): ... to this.
(_M2_Indexing_finish): Rename this...
(_M2_Indexing_fini): ... to this.
(_M2_NameKey_finish): Rename this...
(_M2_NameKey_fini): ... to this.
(_M2_NumberIO_finish): Rename this...
(_M2_NumberIO_fini): ... to this.
(_M2_PushBackInput_finish): Rename this...
(_M2_PushBackInput_fini): ... to this.
(_M2_SymbolKey_finish): Rename this...
(_M2_SymbolKey_fini): ... to this.
(_M2_UnixArgs_finish): Rename this...
(_M2_UnixArgs_fini): ... to this.
(_M2_FIO_finish): Rename this...
(_M2_FIO_fini): ... to this.
(_M2_SFIO_finish): Rename this...
(_M2_SFIO_fini): ... to this.
(_M2_StrCase_finish): Rename this...
(_M2_StrCase_fini): ... to this.
(_M2_bnflex_finish): Rename this...
(_M2_bnflex_fini): ... to this.
(_M2_Lists_finish): Rename this...
(_M2_Lists_fini): ... to this.
(_M2_Args_finish): Rename this...
(_M2_Args_fini): ... to this.
(_M2_Output_finish): Rename this...
(_M2_Output_fini): ... to this.
(_M2_pge_finish): Rename this...
(_M2_pge_fini): ... to this.
* plugin/m2rte.cc (m2_runtime_error_calls): Change all runtime
procedure names to their name mangled counterparts.
* gm2-libs-iso/wrapsock.c: Removed.
* gm2-libs-iso/wraptime.c: Removed.
* mc-boot/Gpth.h: Removed.
* gm2-compiler/PathName.def: New file.
* gm2-compiler/PathName.mod: New file.
libgm2/ChangeLog:
PR modula2/108261
* libm2cor/KeyBoardLEDs.cc (EXPORT): New define.
(M2EXPORT): New define.
(M2LIBNAME): New define.
(KeyBoardLEDs_SwitchScroll): EXPORT.
(KeyBoardLEDs_SwitchNum): EXPORT.
(KeyBoardLEDs_SwitchCaps): EXPORT.
(KeyBoardLEDs_SwitchLeds): EXPORT.
(_M2_KeyBoardLEDs_init): M2EXPORT.
(_M2_KeyBoardLEDs_finish): M2EXPORT.
(_M2_KeyBoardLEDs_dep): M2EXPORT.
* libm2cor/Makefile.am (libm2cor_la_M2FLAGS): Define
path names.
* libm2cor/Makefile.in: Rebuild.
* libm2iso/ErrnoCategory.cc (EXPORT): New define.
(M2EXPORT): New define.
(M2LIBNAME): New define.
(ErrnoCategory_IsErrnoHard): EXPORT.
(ErrnoCategory_IsErrnoSoft): EXPORT.
(ErrnoCategory_UnAvailable): EXPORT.
(ErrnoCategory_GetOpenResults): EXPORT.
(_M2_ErrnoCategory_init): M2EXPORT.
(_M2_ErrnoCategory_fini): M2EXPORT.
(_M2_ErrnoCategory_dep): M2EXPORT.
(_M2_ErrnoCategory_ctor): M2EXPORT.
* libm2iso/Makefile.am (libm2iso_la_M2FLAGS): Define
path names.
* libm2iso/Makefile.in: Rebuild.
* libm2iso/RTco.cc (EXPORT): New define.
(M2EXPORT): New define.
(M2LIBNAME): New define.
(newSem): Add module libname prefix to HaltC.
(currentThread): Remove variable and replace with a function.
(never): Add module libname prefix to HaltC.
(initThread): Add module libname prefix to HaltC.
* libm2iso/m2rts.h (str): New define.
(M2RTS_RequestDependant): Change to the mangled name equivalent.
(M2RTS_RegisterModule): Change to the mangled name equivalent.
(m2iso_M2RTS_RequestDependant): Add libname parameter.
(m2iso_M2RTS_RegisterModule): Add libname parameter.
(m2pim_M2RTS_RegisterModule): Add libname parameter.
(_M2_M2RTS_init): Rename this...
(m2iso_M2_M2RTS_init): ...to this.
(M2RTS_ConstructModules): Change to the mangled name equivalent.
(M2RTS_Terminate): Change to the mangled name equivalent.
(M2RTS_DeconstructModules): Change to the mangled name equivalent.
(m2iso_M2RTS_ConstructModules): Add libname parameter.
(m2iso_M2RTS_Terminate): Add libname parameter.
(m2iso_M2RTS_DeconstructModules): Add libname parameter.
(M2RTS_HaltC): Rename this...
(m2iso_M2RTS_HaltC): ...to this.
* libm2iso/wrapsock.c (EXPORT): New define.
(IMPORT): New define.
(M2EXPORT): New define.
(M2LIBNAME): New define.
(m2iso_M2RTS_RequestDependant): Add prototype.
(wrapsock_clientOpen): EXPORT.
(wrapsock_clientOpenIP): EXPORT.
(wrapsock_getClientPortNo): EXPORT.
(wrapsock_getClientHostname): EXPORT.
(wrapsock_getClientSocketFd): EXPORT.
(wrapsock_getClientIP): EXPORT.
(wrapsock_getPushBackChar): EXPORT.
(wrapsock_setPushBackChar): EXPORT.
(wrapsock_getSizeOfClientInfo): EXPORT.
(_M2_wrapsock_init): M2EXPORT.
(_M2_wrapsock_fini): M2EXPORT.
(ctor): M2EXPORT. New function.
* libm2iso/wraptime.c: Rename to...
* libm2iso/wraptime.cc: ...this.
(EXPORT): New define.
(M2EXPORT): New define.
(M2LIBNAME): New define.
(wraptime_InitTimeval): EXPORT.
(wraptime_KillTimeval): EXPORT.
(wraptime_InitTimezone): EXPORT.
(wraptime_KillTimezone): EXPORT.
(wraptime_InitTM): EXPORT.
(wraptime_KillTM): EXPORT.
(wraptime_gettimeofday): EXPORT.
(wraptime_settimeofday): EXPORT.
(wraptime_GetFractions): EXPORT.
(wraptime_localtime_r): EXPORT.
(wraptime_GetYear): EXPORT.
(wraptime_GetMonth): EXPORT.
(wraptime_GetDay): EXPORT.
(wraptime_GetHour): EXPORT.
(wraptime_GetMinute): EXPORT.
(wraptime_GetSecond): EXPORT.
(wraptime_GetSummerTime): EXPORT.
(wraptime_GetDST): EXPORT.
(wraptime_SetTimezone): EXPORT.
(wraptime_SetTimeval): EXPORT.
(_M2_wraptime_init): M2EXPORT.
(_M2_wraptime_fini): M2EXPORT.
(ctor): M2EXPORT. New function.
* libm2log/Makefile.am (libm2log_la_M2FLAGS): Define
path names.
* libm2log/Makefile.in:
* libm2min/Makefile.am (libm2min_la_M2FLAGS): Define
path names.
* libm2min/Makefile.in:
* libm2pim/Makefile.am (libm2pim_la_M2FLAGS): Define
path names.
* libm2pim/Makefile.in:
* libm2pim/Selective.cc (EXPORT): New define.
(M2EXPORT): New define.
(M2LIBNAME): New define.
(Selective_Select): EXPORT.
(Selective_InitTime): EXPORT.
(Selective_GetTime): EXPORT.
(Selective_SetTime): EXPORT.
(Selective_KillTime): EXPORT.
(Selective_InitSet): EXPORT.
(Selective_KillSet): EXPORT.
(Selective_FdZero): EXPORT.
(Selective_FdSet): EXPORT.
(Selective_FdClr): EXPORT.
(Selective_FdIsSet): EXPORT.
(Selective_GetTimeOfDay): EXPORT.
(Selective_MaxFdsPlusOne): EXPORT.
(Selective_WriteCharRaw): EXPORT.
(Selective_ReadCharRaw): EXPORT.
(_M2_Selective_init): M2EXPORT.
(_M2_Selective_fini): M2EXPORT.
(_M2_Selective_dep): M2EXPORT.
(_M2_Selective_ctor): M2EXPORT.
* libm2pim/SysExceptions.cc (EXPORT): New define.
(M2EXPORT): New define.
(M2LIBNAME): New define.
(SysExceptions_InitExceptionHandlers): EXPORT.
(_M2_SysExceptions_init): M2EXPORT.
(_M2_SysExceptions_fini): M2EXPORT.
(_M2_SysExceptions_dep): M2EXPORT.
(_M2_SysExceptions_ctor): M2EXPORT.
* libm2pim/UnixArgs.cc (EXPORT): New define.
(M2EXPORT): New define.
(M2LIBNAME): New define.
(UnixArgs_GetArgC): EXPORT.
(UnixArgs_GetArgV): EXPORT.
(UnixArgs_GetEnvV): EXPORT.
(_M2_UnixArgs_init): M2EXPORT.
(_M2_UnixArgs_fini): M2EXPORT.
(_M2_UnixArgs_dep): M2EXPORT.
(_M2_UnixArgs_ctor): M2EXPORT.
* libm2pim/cgetopt.cc (EXPORT): New define.
(M2EXPORT): New define.
(M2LIBNAME): New define.
(cgetopt_getopt): EXPORT.
(cgetopt_getopt_long): EXPORT.
(cgetopt_getopt_long_only): EXPORT.
(cgetopt_InitOptions): EXPORT.
(cgetopt_KillOptions): EXPORT.
(cgetopt_SetOption): EXPORT.
(cgetopt_GetLongOptionArray): EXPORT.
(_M2_cgetopt_init): M2EXPORT.
(_M2_cgetopt_fini): M2EXPORT.
(_M2_cgetopt_dep): M2EXPORT.
(_M2_cgetopt_ctor): M2EXPORT.
* libm2pim/dtoa.cc (EXPORT): New define.
(M2EXPORT): New define.
(M2LIBNAME): New define.
(dtoa_strtod): EXPORT.
(dtoa_calcmaxsig): EXPORT.
(dtoa_calcdecimal): EXPORT.
(dtoa_calcsign): EXPORT.
(dtoa_dtoa): EXPORT.
(_M2_dtoa_init): M2EXPORT.
(_M2_dtoa_fini): M2EXPORT.
(_M2_dtoa_dep): M2EXPORT.
(_M2_dtoa_ctor): M2EXPORT.
* libm2pim/errno.cc (EXPORT): New define.
(M2EXPORT): New define.
(M2LIBNAME): New define.
(errno_geterrno): EXPORT.
(_M2_errno_init): M2EXPORT.
(_M2_errno_fini): M2EXPORT.
(_M2_errno_dep): M2EXPORT.
(_M2_errno_ctor): M2EXPORT.
* libm2pim/ldtoa.cc (EXPORT): New define.
(IMPORT): New define.
(M2EXPORT): New define.
(M2LIBNAME): New define.
(dtoa_calcmaxsig): EXPORT.
(dtoa_calcdecimal): EXPORT.
(dtoa_calcsign): EXPORT.
(ldtoa_strtold): EXPORT.
(ldtoa_ldtoa): EXPORT.
(_M2_ldtoa_init): M2EXPORT.
(_M2_ldtoa_fini): M2EXPORT.
(_M2_ldtoa_dep): M2EXPORT.
(_M2_ldtoa_ctor): M2EXPORT.
* libm2pim/sckt.cc (EXPORT): New define.
(M2EXPORT): New define.
(M2LIBNAME): New define.
(tcpServerEstablishPort): EXPORT.
(tcpServerEstablish): EXPORT.
(tcpServerAccept): EXPORT.
(tcpServerPortNo): EXPORT.
(tcpServerSocketFd): EXPORT.
(getLocalIP): EXPORT.
(tcpServerIP): EXPORT.
(tcpServerClientIP): EXPORT.
(tcpServerClientPortNo): EXPORT.
(tcpClientSocket): EXPORT.
(tcpClientSocketIP): EXPORT.
(tcpClientConnect): EXPORT.
(tcpClientPortNo): EXPORT.
(tcpClientSocketFd): EXPORT.
(tcpClientIP): EXPORT.
(_M2_sckt_init): M2EXPORT.
(_M2_sckt_finish): M2EXPORT.
(_M2_sckt_dep): M2EXPORT.
(_M2_sckt_ctor): M2EXPORT.
* libm2pim/termios.cc (EXPORT): New define.
(M2EXPORT): New define.
(M2LIBNAME): New define.
(_M2_termios_init): M2EXPORT.
(_M2_termios_fini): M2EXPORT.
(_M2_termios_dep): M2EXPORT.
(_M2_termios_ctor): M2EXPORT.
* libm2pim/wrapc.c (EXPORT): New define.
(M2EXPORT): New define.
(M2LIBNAME): New define.
(wrapc_strtime): EXPORT.
(wrapc_filesize): EXPORT.
(wrapc_filemtime): EXPORT.
(wrapc_fileinode): EXPORT.
(wrapc_getrand): EXPORT.
(wrapc_getusername): EXPORT.
(wrapc_getnameuidgid): EXPORT.
(wrapc_signbit): EXPORT.
(wrapc_signbitl): EXPORT.
(wrapc_signbitf): EXPORT.
(wrapc_isfinite): EXPORT.
(wrapc_isfinitel): EXPORT.
(wrapc_isfinitef): EXPORT.
(_M2_wrapc_init): M2EXPORT.
(_M2_wrapc_fini): M2EXPORT.
(_M2_wrapc_ctor): M2EXPORT.
gcc/testsuite/ChangeLog:
PR modula2/108261
* gm2/examples/callingC/pass/examples-callingC-pass.exp: Tidy up
variable access.
* gm2/examples/callingC/run/pass/examples-callingC-run-pass.exp: Tidy up
variable access.
* gm2/examples/cpp/pass/examples-cpp-pass.exp: Tidy up
variable access.
* gm2/examples/cppDef/pass/examples-cppDef-pass.exp: Tidy up
variable access.
* gm2/examples/hello/pass/examples-hello-pass.exp: Tidy up
variable access.
* gm2/examples/map/pass/examples-map-pass.exp: Tidy up
variable access.
* gm2/iso/check/fail/iso-check-fail.exp: Add pathname.
* gm2/link/externalscaffold/pass/link-externalscaffold-pass.exp:
Add pathname.
* gm2/link/externalscaffold/pass/scaffold.c: Add mangled export name.
* gm2/pimlib/base/run/pass/FIO.mod: Updated test code.
* gm2/pimlib/base/run/pass/StrLib.mod: Updated test code.
* gm2/pimlib/base/run/pass/pimlib-base-run-pass.exp: Remove path.
* gm2/projects/pim/run/pass/random/projects-pim-run-pass-random.exp:
Tidy up variable access.
* gm2/switches/auto-init/fail/switches-auto-init-fail.exp: Add pathname.
* gm2/switches/check-all/pim2/fail/switches-check-all-pim2-fail.exp:
Add pathname.
* gm2/switches/makeall/fail/switches-makeall-fail.exp: Remove -fmakeall.
* gm2/switches/makeall/pass/switches-makeall-pass.exp: Remove -fmakeall.
* lib/gm2-simple.exp (gm2_keep_executable): New global variable.
(gm2_simple_execute): Keep executable if global is true.
* lib/gm2-torture.exp: Add ; after global variable access.
* lib/gm2.exp: Set up pathnames.
* gm2/projects/pim/run/pass/tower/AdvCmd.def: New test.
* gm2/projects/pim/run/pass/tower/AdvCmd.mod: New test.
* gm2/projects/pim/run/pass/tower/AdvIntroduction.def: New test.
* gm2/projects/pim/run/pass/tower/AdvIntroduction.mod: New test.
* gm2/projects/pim/run/pass/tower/AdvMap.def: New test.
* gm2/projects/pim/run/pass/tower/AdvMap.mod: New test.
* gm2/projects/pim/run/pass/tower/AdvMath.def: New test.
* gm2/projects/pim/run/pass/tower/AdvMath.mod: New test.
* gm2/projects/pim/run/pass/tower/AdvParse.bnf: New test.
* gm2/projects/pim/run/pass/tower/AdvParse.def: New test.
* gm2/projects/pim/run/pass/tower/AdvParse.mod: New test.
* gm2/projects/pim/run/pass/tower/AdvSound.def: New test.
* gm2/projects/pim/run/pass/tower/AdvSound.mod: New test.
* gm2/projects/pim/run/pass/tower/AdvSystem.def: New test.
* gm2/projects/pim/run/pass/tower/AdvSystem.mod: New test.
* gm2/projects/pim/run/pass/tower/AdvTreasure.def: New test.
* gm2/projects/pim/run/pass/tower/AdvTreasure.mod: New test.
* gm2/projects/pim/run/pass/tower/AdvUtil.def: New test.
* gm2/projects/pim/run/pass/tower/AdvUtil.mod: New test.
* gm2/projects/pim/run/pass/tower/DrawG.def: New test.
* gm2/projects/pim/run/pass/tower/DrawG.mod: New test.
* gm2/projects/pim/run/pass/tower/DrawL.def: New test.
* gm2/projects/pim/run/pass/tower/DrawL.mod: New test.
* gm2/projects/pim/run/pass/tower/Dungeon.mod: New test.
* gm2/projects/pim/run/pass/tower/Lock.def: New test.
* gm2/projects/pim/run/pass/tower/Lock.mod: New test.
* gm2/projects/pim/run/pass/tower/ProcArgs.def: New test.
* gm2/projects/pim/run/pass/tower/ProcArgs.mod: New test.
* gm2/projects/pim/run/pass/tower/Screen.def: New test.
* gm2/projects/pim/run/pass/tower/Screen.mod: New test.
* gm2/projects/pim/run/pass/tower/SocketControl.c: New test.
* gm2/projects/pim/run/pass/tower/SocketControl.def: New test.
* gm2/projects/pim/run/pass/tower/Window.def: New test.
* gm2/projects/pim/run/pass/tower/Window.mod: New test.
* gm2/projects/pim/run/pass/tower/adv.flex: New test.
* gm2/projects/pim/run/pass/tower/advflex.c: New test.
* gm2/projects/pim/run/pass/tower/advflex.def: New test.
* gm2/projects/pim/run/pass/tower/projects-pim-run-pass-tower.exp:
New test.
* gm2/projects/pim/run/pass/tower/star: New test.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-02-25 16:28:19 +00:00
GCC Administrator
6e16c354f5
Daily bump.
2023-02-20 00:16:30 +00:00
Gaius Mulley
b9c83e7789
libgm2/libm2iso/RTco.cc (re-implementation) Bugfix for [PR108835]
...
This is a re-implementation of RTco.cc which fixes the race hazzard
seen occasionally when running testtransfer and coroutines from the
modula2 testsuite.
libgm2/ChangeLog:
PR testsuite/108835
* libm2iso/RTco.cc: Re-implementation using a single lock
mutex and inlined wait/signal implementation within
transfer.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-02-19 22:08:31 +00:00
GCC Administrator
ae7197818d
Daily bump.
2023-02-14 00:17:33 +00:00
Gaius Mulley
296cf77b78
Cleanup libgm2/libm2iso/RTco.cc
...
This patch removes the macro tprintf sizeof nop hack and replaces
it with tprintf (...).
libgm2/ChangeLog:
* libm2iso/RTco.cc (tprintf): Replace definition.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-02-13 19:06:36 +00:00
GCC Administrator
0a251e7497
Daily bump.
2023-02-02 00:17:43 +00:00
Gaius Mulley
9fadd8dec7
Fixup noreturn attributes in modula-2 [PR108551] and [PR108612]
...
PR108612 - m2/gm2-libs-iso/ClientSocket.mod:229:1: error: control
reaches end of non-void function [-Werror=return-type]
PR108551 - gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control
reaches end of non-void function [-Werror=return-type]
This patch adds missing return values to the procedure functions
mentioned in PR108612 and PR108551. It corrects the noreturn
attribute to throw and rethrow in the modula2 frontend. The patch
also changes HALT, Halt, Raise procedures in the libraries to use
the <* noreturn *> attribute. Finally the patch includes
rebuilt bootstrap tools mc and pge.
gcc/m2/ChangeLog:
* Make-lang.in (GM2_FLAGS): Add -fno-return -Wreturn-type.
(GM2_ISO_FLAGS): Add -fno-return -Wreturn-type.
* Make-maintainer.in (GM2PATH): Split into separate -I components.
(MC-LIB-DEFS): Add RTentity.def.
(m2/boot-bin/mc-devel$(exeext)): Changed -I$(GM2PATH) to
$(GM2PATH).
(m2/boot-bin/mc-opt$(exeext)): Separate -I paths.
(m2/mc/decl.o): Separate -I paths.
(gm2-bootstrap): Separate -I paths.
(m2/mc-boot-gen/$(SRC_PREFIX)%.h): Separate -I paths.
(m2/mc-boot-gen/$(SRC_PREFIX)decl.c): Separate -I paths.
(m2/mc-boot-gen/$(SRC_PREFIX)%.c): Separate -I paths.
(gm2.verifyparanoid): Separate -I paths.
(gm2.verifystage12): Separate -I paths.
* gm2-compiler/M2ALU.mod (GetConstructorElement): Add default
Return NulSym. Remove return from the error case.
* gm2-compiler/M2Base.mod (ComplexToScalar): Return RType
from the error case.
(MixMetaTypes): Return MakeError as a default.
* gm2-compiler/M2GCCDeclare.mod (GetTypeMin): Return NulSym
from the error case.
(GetTypeMax): Return NulSym from the error case.
* gm2-compiler/M2GenGCC.mod (IsExportedGcc): Replace Assert
by InternalError.
* gm2-compiler/M2Quads.mod (GetItemPointedTo): Add InternalError.
(GetTypeMin): Add InternalError.
(GetTypeMax): Add InternalError.
* gm2-compiler/M2System.mod (InitSystem): Call
PutProcedureNoReturn on Throw.
* gm2-gcc/m2except.cc (m2except_InitExceptions): fn_throw_tree
declare as noreturn. fn_rethrow_tree declare as noreturn.
* gm2-libs-coroutines/Debug.def (Halt): Add noreturn attribute.
* gm2-libs-coroutines/SYSTEM.def (THROW): Add noreturn attribute.
* gm2-libs-iso/ClientSocket.mod (dorbytes): Add return FALSE.
* gm2-libs-iso/EXCEPTIONS.def (RAISE): Add noreturn attribute.
* gm2-libs-iso/IOLink.def (RAISEdevException): Add noreturn attribute.
* gm2-libs-iso/M2RTS.def (HALT): Add noreturn attribute.
(Halt): Ditto.
(HaltC): Ditto.
(ErrorMessage): Ditto.
(AssignmentException): Ditto.
(ReturnException): Ditto.
(IncException): Ditto.
(DecException): Ditto.
(InclException): Ditto.
(ExclException): Ditto.
(ShiftException): Ditto.
(RotateException): Ditto.
(StaticArraySubscriptException): Ditto.
(DynamicArraySubscriptException): Ditto.
(ForLoopBeginException): Ditto.
(ForLoopToException): Ditto.
(ForLoopEndException): Ditto.
(PointerNilException): Ditto.
(NoReturnException): Ditto.
(CaseException): Ditto.
(WholeNonPosDivException): Ditto.
(WholeNonPosModException): Ditto.
(WholeZeroDivException): Ditto.
(WholeZeroRemException): Ditto.
(WholeValueException): Ditto.
(RealValueException): Ditto.
(ParameterException): Ditto.
(NoException): Ditto.
* gm2-libs-iso/SYSTEM.def (THROW): Ditto.
* gm2-libs-iso/TermFile.mod (dorbytes): Add default return FALSE.
* gm2-libs-min/M2RTS.def: Add noreturn attribute.
* gm2-libs/FIO.mod (BufferedRead): Return -1.
(getFileName): Return NIL.
(getFileNameLength): Return 0.
* gm2-libs/M2RTS.def (HaltC): Add noreturn attribute.
(AssignmentException): Ditto.
(ReturnException): Ditto.
(IncException): Ditto.
(DecException): Ditto.
(InclException): Ditto.
(ExclException): Ditto.
(ShiftException): Ditto.
(RotateException): Ditto.
(StaticArraySubscriptException): Ditto.
(DynamicArraySubscriptException): Ditto.
(ForLoopBeginException): Ditto.
(ForLoopToException): Ditto.
(ForLoopEndException): Ditto.
(PointerNilException): Ditto.
(NoReturnException): Ditto.
(CaseException): Ditto.
(WholeNonPosDivException): Ditto.
(WholeNonPosModException): Ditto.
(WholeZeroDivException): Ditto.
(WholeZeroRemException): Ditto.
(WholeValueException): Ditto.
(RealValueException): Ditto.
(ParameterException): Ditto.
(NoException): Ditto.
* gm2-libs/RTExceptions.def (Raise): Ditto.
* gm2-libs/RTExceptions.mod (InvokeHandler): Ditto.
* gm2-libs/SYSTEM.def (THROW): Ditto.
* m2.flex (_M2_m2flex_fini): Remamed to...
(_M2_m2flex_finish): ...here.
* mc-boot-ch/GBuiltins.c (_M2_Builtins_finish): Remamed to...
(_M2_Builtins_fini): ...this.
* mc-boot-ch/GRTco.c (_M2_RTco_finish): Remamed to...
(_M2_RTco_fini): ...this.
* mc-boot-ch/GSYSTEM.c (_M2_SYSTEM_finish): Remamed to...
(_M2_SYSTEM_fini): ...this.
* mc-boot-ch/GSelective.c (_M2_Selective_finish): Remamed to...
(_M2_Selective_fini): ...this.
* mc-boot-ch/GSysExceptions.c (_M2_SysExceptions_init): Add
parameters.
(_M2_SysExceptions_finish): Remamed to...
(_M2_SysExceptions_fini): ...this.
* mc-boot-ch/GUnixArgs.cc (_M2_UnixArgs_finish): Remamed to...
(_M2_UnixArgs_fini): ...this.
(_M2_UnixArgs_ctor::_M2_UnixArgs_ctor): Change parameter
to _M2_UnixArgs_fini.
* mc-boot-ch/Gdtoa.c (_M2_dtoa_finish): Remamed to...
(_M2_dtoa_fini): ...this.
* mc-boot-ch/Gerrno.c (_M2_errno_finish): Remamed to...
(_M2_errno_fini): ...this.
* mc-boot-ch/Gldtoa.c (_M2_ldtoa_finish): Remamed to...
(_M2_ldtoa_fini): ...this.
* mc-boot-ch/Gtermios.cc (_M2_termios_init): Add parameters.
(_M2_termios_finish): Remamed to...
(_M2_termios_fini): ...this.
* mc-boot-ch/Gwrapc.c (_M2_wrapc_init): Add parameters.
(_M2_wrapc_finish): Remamed to...
(_M2_wrapc_fini): ...this.
* mc-boot/GASCII.c: Rebuild.
* mc-boot/GArgs.c: Rebuild.
* mc-boot/GAssertion.c: Rebuild.
* mc-boot/GBreak.c: Rebuild.
* mc-boot/GCmdArgs.c: Rebuild.
* mc-boot/GDebug.c: Rebuild.
* mc-boot/GDynamicStrings.c: Rebuild.
* mc-boot/GEnvironment.c: Rebuild.
* mc-boot/GFIO.c: Rebuild.
* mc-boot/GFormatStrings.c: Rebuild.
* mc-boot/GFpuIO.c: Rebuild.
* mc-boot/GIO.c: Rebuild.
* mc-boot/GIndexing.c: Rebuild.
* mc-boot/GM2Dependent.c: Rebuild.
* mc-boot/GM2EXCEPTION.c: Rebuild.
* mc-boot/GM2RTS.c: Rebuild.
* mc-boot/GM2RTS.h: Rebuild.
* mc-boot/GMemUtils.c: Rebuild.
* mc-boot/GNumberIO.c: Rebuild.
* mc-boot/GPushBackInput.c: Rebuild.
* mc-boot/GRTExceptions.c: Rebuild.
* mc-boot/GRTExceptions.h: Rebuild.
* mc-boot/GRTco.h: Rebuild.
* mc-boot/GRTint.c: Rebuild.
* mc-boot/GSArgs.c: Rebuild.
* mc-boot/GSFIO.c: Rebuild.
* mc-boot/GStdIO.c: Rebuild.
* mc-boot/GStorage.c: Rebuild.
* mc-boot/GStrCase.c: Rebuild.
* mc-boot/GStrIO.c: Rebuild.
* mc-boot/GStrLib.c: Rebuild.
* mc-boot/GStringConvert.c: Rebuild.
* mc-boot/GSysStorage.c: Rebuild.
* mc-boot/GTimeString.c: Rebuild.
* mc-boot/Galists.c: Rebuild.
* mc-boot/Gdecl.c: Rebuild.
* mc-boot/Gkeyc.c: Rebuild.
* mc-boot/Glists.c: Rebuild.
* mc-boot/GmcComment.c: Rebuild.
* mc-boot/GmcComp.c: Rebuild.
* mc-boot/GmcDebug.c: Rebuild.
* mc-boot/GmcError.c: Rebuild.
* mc-boot/GmcFileName.c: Rebuild.
* mc-boot/GmcLexBuf.c: Rebuild.
* mc-boot/GmcMetaError.c: Rebuild.
* mc-boot/GmcOptions.c: Rebuild.
* mc-boot/GmcPreprocess.c: Rebuild.
* mc-boot/GmcPretty.c: Rebuild.
* mc-boot/GmcPrintf.c: Rebuild.
* mc-boot/GmcQuiet.c: Rebuild.
* mc-boot/GmcReserved.c: Rebuild.
* mc-boot/GmcSearch.c: Rebuild.
* mc-boot/GmcStack.c: Rebuild.
* mc-boot/GmcStream.c: Rebuild.
* mc-boot/Gmcp1.c: Rebuild.
* mc-boot/Gmcp2.c: Rebuild.
* mc-boot/Gmcp3.c: Rebuild.
* mc-boot/Gmcp4.c: Rebuild.
* mc-boot/Gmcp5.c: Rebuild.
* mc-boot/GnameKey.c: Rebuild.
* mc-boot/GsymbolKey.c: Rebuild.
* mc-boot/Gtop.c: Rebuild.
* mc-boot/Gvarargs.c: Rebuild.
* mc-boot/Gwlists.c: Rebuild.
* mc-boot/GRTentity.h: New file.
* mc/decl.mod (scaffoldStatic): Change _finish to _fini.
* mc/mc.flex (_M2_mcflex_fini): New function.
(_M2_mcflex_finish): Remove function.
* tools-src/mklink.c (GenerateFinishCalls): Change
_finish to _fini.
(GeneratePrototypes): Change _finish to _fini.
libgm2/ChangeLog:
* libm2cor/Makefile.am (libm2cor_la_M2FLAGS): Add -Wreturn-type
-fcase.
* libm2cor/Makefile.in: Rebuild.
* libm2iso/Makefile.am (libm2iso_la_M2FLAGS): Add -Wreturn-type
-fcase.
* libm2iso/Makefile.in: Rebuild.
* libm2log/Makefile.am (libm2log_la_M2FLAGS): Add -Wreturn-type
-fcase.
* libm2log/Makefile.in: Rebuild.
* libm2pim/Makefile.am (libm2pim_la_M2FLAGS): Add -Wreturn-type
-fcase.
* libm2pim/Makefile.in: Rebuild.
PR modula2/108612
PR modula2/108551
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-02-01 17:26:00 +00:00
GCC Administrator
317525b03e
Daily bump.
2023-02-01 00:18:50 +00:00
Richard Biener
7f583a3357
modula2/108462 - duplicate install of static modula2 target libs
...
The following addresses the fact that libgm2 installs static libraries
into two places, one performed by
toolexeclib_LTLIBRARIES = libm2cor.la
and one performed as part of the install-data-local rule to a
m2/m2cor subdirectory alongside Modula-2 .def and .mod files.
This patch opts to keep the copy installed by libtool and removes
the extra installs in the install-data-local rules.
I've built and installed both with and without
--enable-version-specific-runtime-libs and compiled and linked
a Modula-2 testcase with the installed compiler with the two
multilibs and with and without static successfully.
PR modula2/108462
libgm2/
* libm2cor/Makefile.am: Remove static lib install from
install-data-local.
* libm2iso/Makefile.am: Likewise.
* libm2log/Makefile.am: Likewise.
* libm2min/Makefile.am: Likewise.
* libm2pim/Makefile.am: Likewise.
* libm2cor/Makefile.in: Regenerate.
* libm2iso/Makefile.in: Likewise.
* libm2log/Makefile.in: Likewise.
* libm2min/Makefile.in: Likewise.
* libm2pim/Makefile.in: Likewise.
2023-01-31 15:54:17 +01:00
Gaius Mulley
9e56306f4d
Modula-2 rename logitech libraries to log
...
Rename the gcc/m2/gm2-libs-pim to gcc/m2/gm2-libs-log for
consistency.
gcc/m2/ChangeLog:
* Make-lang.in (gm2-libs.texi-check): Rename
m2/gm2-libs-pim to m2/gm2-libs-log.
* gm2-libs-pim/BitBlockOps.def: Moved to...
* gm2-libs-log/BitBlockOps.def: ...here.
* gm2-libs-pim/BitBlockOps.mod: Moved to...
* gm2-libs-log/BitBlockOps.mod: ...here.
* gm2-libs-pim/BitByteOps.def: Moved to...
* gm2-libs-log/BitByteOps.def: ...here.
* gm2-libs-pim/BitByteOps.mod: Moved to...
* gm2-libs-log/BitByteOps.mod: ...here.
* gm2-libs-pim/BitWordOps.def: Moved to...
* gm2-libs-log/BitWordOps.def: ...here.
* gm2-libs-pim/BitWordOps.mod: Moved to...
* gm2-libs-log/BitWordOps.mod: ...here.
* gm2-libs-pim/BlockOps.def: Moved to...
* gm2-libs-log/BlockOps.def: ...here.
* gm2-libs-pim/BlockOps.mod: Moved to...
* gm2-libs-log/BlockOps.mod: ...here.
* gm2-libs-pim/Break.c: Moved to...
* gm2-libs-log/Break.c: ...here.
* gm2-libs-pim/Break.def: Moved to...
* gm2-libs-log/Break.def: ...here.
* gm2-libs-pim/CardinalIO.def: Moved to...
* gm2-libs-log/CardinalIO.def: ...here.
* gm2-libs-pim/CardinalIO.mod: Moved to...
* gm2-libs-log/CardinalIO.mod: ...here.
* gm2-libs-pim/Conversions.def: Moved to...
* gm2-libs-log/Conversions.def: ...here.
* gm2-libs-pim/Conversions.mod: Moved to...
* gm2-libs-log/Conversions.mod: ...here.
* gm2-libs-pim/DebugPMD.def: Moved to...
* gm2-libs-log/DebugPMD.def: ...here.
* gm2-libs-pim/DebugPMD.mod: Moved to...
* gm2-libs-log/DebugPMD.mod: ...here.
* gm2-libs-pim/DebugTrace.def: Moved to...
* gm2-libs-log/DebugTrace.def: ...here.
* gm2-libs-pim/DebugTrace.mod: Moved to...
* gm2-libs-log/DebugTrace.mod: ...here.
* gm2-libs-pim/Delay.def: Moved to...
* gm2-libs-log/Delay.def: ...here.
* gm2-libs-pim/Delay.mod: Moved to...
* gm2-libs-log/Delay.mod: ...here.
* gm2-libs-pim/Display.def: Moved to...
* gm2-libs-log/Display.def: ...here.
* gm2-libs-pim/Display.mod: Moved to...
* gm2-libs-log/Display.mod: ...here.
* gm2-libs-pim/ErrorCode.def: Moved to...
* gm2-libs-log/ErrorCode.def: ...here.
* gm2-libs-pim/ErrorCode.mod: Moved to...
* gm2-libs-log/ErrorCode.mod: ...here.
* gm2-libs-pim/FileSystem.def: Moved to...
* gm2-libs-log/FileSystem.def: ...here.
* gm2-libs-pim/FileSystem.mod: Moved to...
* gm2-libs-log/FileSystem.mod: ...here.
* gm2-libs-pim/FloatingUtilities.def: Moved to...
* gm2-libs-log/FloatingUtilities.def: ...here.
* gm2-libs-pim/FloatingUtilities.mod: Moved to...
* gm2-libs-log/FloatingUtilities.mod: ...here.
* gm2-libs-pim/InOut.def: Moved to...
* gm2-libs-log/InOut.def: ...here.
* gm2-libs-pim/InOut.mod: Moved to...
* gm2-libs-log/InOut.mod: ...here.
* gm2-libs-pim/Keyboard.def: Moved to...
* gm2-libs-log/Keyboard.def: ...here.
* gm2-libs-pim/Keyboard.mod: Moved to...
* gm2-libs-log/Keyboard.mod: ...here.
* gm2-libs-pim/LongIO.def: Moved to...
* gm2-libs-log/LongIO.def: ...here.
* gm2-libs-pim/LongIO.mod: Moved to...
* gm2-libs-log/LongIO.mod: ...here.
* gm2-libs-pim/NumberConversion.def: Moved to...
* gm2-libs-log/NumberConversion.def: ...here.
* gm2-libs-pim/NumberConversion.mod: Moved to...
* gm2-libs-log/NumberConversion.mod: ...here.
* gm2-libs-pim/README.texi: Moved to...
* gm2-libs-log/README.texi: ...here.
* gm2-libs-pim/Random.def: Moved to...
* gm2-libs-log/Random.def: ...here.
* gm2-libs-pim/Random.mod: Moved to...
* gm2-libs-log/Random.mod: ...here.
* gm2-libs-pim/RealConversions.def: Moved to...
* gm2-libs-log/RealConversions.def: ...here.
* gm2-libs-pim/RealConversions.mod: Moved to...
* gm2-libs-log/RealConversions.mod: ...here.
* gm2-libs-pim/RealInOut.def: Moved to...
* gm2-libs-log/RealInOut.def: ...here.
* gm2-libs-pim/RealInOut.mod: Moved to...
* gm2-libs-log/RealInOut.mod: ...here.
* gm2-libs-pim/Strings.def: Moved to...
* gm2-libs-log/Strings.def: ...here.
* gm2-libs-pim/Strings.mod: Moved to...
* gm2-libs-log/Strings.mod: ...here.
* gm2-libs-pim/Termbase.def: Moved to...
* gm2-libs-log/Termbase.def: ...here.
* gm2-libs-pim/Termbase.mod: Moved to...
* gm2-libs-log/Termbase.mod: ...here.
* gm2-libs-pim/Terminal.def: Moved to...
* gm2-libs-log/Terminal.def: ...here.
* gm2-libs-pim/Terminal.mod: Moved to...
* gm2-libs-log/Terminal.mod: ...here.
* gm2-libs-pim/TimeDate.def: Moved to...
* gm2-libs-log/TimeDate.def: ...here.
* gm2-libs-pim/TimeDate.mod: Moved to...
* gm2-libs-log/TimeDate.mod: ...here.
libgm2/ChangeLog:
* libm2log/Makefile.am (VPATH): Replace gm2-libs-pim
with gm2-libs-log.
(libm2log_la_M2FLAGS): Replace gm2-libs-pim with
gm2-libs-log.
(install-data-local): Replace gm2-libs-pim with
gm2-libs-log.
* libm2log/Makefile.in: Rebuilt.
gcc/testsuite/ChangeLog:
* lib/gm2.exp (gm2_init_pimx): Replace gm2-libs-pim with
gm2-libs-log.
(gm2_init_iso): Replace gm2-libs-pim with gm2-libs-log.
(gm2_init_ulm): Replace gm2-libs-pim with gm2-libs-log.
(gm2_init_log): Replace gm2-libs-pim with gm2-libs-log.
(gm2_init_cor): Replace gm2-libs-pim with gm2-libs-log.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-01-31 12:37:36 +00:00
GCC Administrator
2371d100b9
Daily bump.
2023-01-27 00:17:53 +00:00
Gaius Mulley
6a5aa8319c
libgm2/configure.ac use newer automake (1.15.1)
...
Use a newer automake (1.15.1).
libgm2/ChangeLog:
* configure.ac (AM_INIT_AUTOMAKE): Specify 1.15.1.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-01-26 01:41:09 +00:00
GCC Administrator
0fa221685a
Daily bump.
2023-01-25 00:17:57 +00:00
Gaius Mulley
f235d69572
Introduce new module to create search paths of dynamic strings.
...
Introduce a simple DynamicStringPath module to allow the front end
to create and modify a search path from dynamic strings.
gcc/m2/ChangeLog:
* Make-lang.in (GM2-COMP-BOOT-DEFS): Add
DynamicStringPath.def.
(GM2-COMP-BOOT-MODS): Add DynamicStringPath.mod.
(GM2-COMP-DEFS): Add DynamicStringPath.def.
(GM2-COMP-MODS): Add DynamicStringPath.mod.
($(objdir)/m2/gm2-libs-min/SYSTEM.def): Split path into
multiple -I components.
($(objdir)/m2/gm2-libs/SYSTEM.def): Ditto.
($(objdir)/m2/gm2-libs-coroutines/SYSTEM.def): Ditto.
* gm2-compiler/M2Options.mod: Import DynamicStringPath.
(SetSearchPath): Reimplement using DynamicStringPath
procedures.
* gm2-compiler/M2Search.def (InitSearchPath): Remove.
(PrependSearchPath): Remove.
* gm2-compiler/M2Search.mod (SFIO): Remove import.
(DynamicStringPath): Add import.
(Directory): Remove.
(UserPath): Remove.
(InitialPath): Remove.
(InitSearchPath): Remove.
(PrependSearchPath): Remove.
(FindSourceFile): Re-implement.
(FindSourceDefFile): Re-implement.
(FindSourceModFile): Re-implement.
* gm2-gcc/init.cc (_M2_DynamicStringPath_init):
New prototype.
(init_FrontEndInit): Call _M2_DynamicStringPath_init.
* tools-src/makeSystem: Allow multiple -I paths.
* gm2-compiler/DynamicStringPath.def: New file.
* gm2-compiler/DynamicStringPath.mod: New file.
* gm2-gcc/m2options.h (M2Options_SetMakeIncludePath): Add
prototype.
Co-Authored by: Iain Sandoe <iain@sandoe.co.uk>
libgm2/ChangeLog:
* libm2cor/Makefile.am (SYSTEM.def): Split path into
multiple -I components.
* libm2cor/Makefile.in: Rebuild.
* libm2min/Makefile.am (SYSTEM.def): Split path into
multiple -I components.
* libm2min/Makefile.in: Rebuild.
* libm2iso/Makefile.am (SYSTEM.def): Split path into
multiple -I components.
* libm2iso/Makefile.in: Rebuild.
Co-Authored by: Iain Sandoe <iain@sandoe.co.uk>
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-01-24 22:41:45 +00:00
GCC Administrator
607f278a35
Daily bump.
2023-01-24 00:17:23 +00:00
Richard Biener
47465fff97
modula2/108144 - fix mistake in previous change
...
The previous change to avoid a duplicate multi directory
caused the m2/m2{cor,iso,log,min,pim} installs to happen
relative to the main library directory when not using
--enable-version-specific-runtime-libs which doesn't match
the drivers expectation where to find them. The following
fixes the original issue by simply dropping the duplicate
multi directory since the one in the $(inst_libdir) variable
now works.
Tested by building and installing with and without
--enable-version-specific-runtime-libs and compiling and
linking a modula-2 testcase successfully with the installed
compilers.
PR modula2/108144
libgm2/
* libm2cor/Makefile.am: Revert previous change, instead
drop the redundant $(MULTIDIR).
* libm2iso/Makefile.am: Likewise.
* libm2log/Makefile.am: Likewise.
* libm2min/Makefile.am: Likewise.
* libm2pim/Makefile.am: Likewise.
* libm2cor/Makefile.in: Regenerate.
* libm2iso/Makefile.in: Likewise.
* libm2log/Makefile.in: Likewise.
* libm2min/Makefile.in: Likewise.
* libm2pim/Makefile.in: Likewise.
2023-01-23 11:19:00 +01:00
Richard Biener
e61d43791e
modula2/108144 - Fix multilib install of libgm2
...
The following adjusts libgm2 to properly use the multilib build
infrastructure, thereby fixing the install with
--enable-version-specific-runtime-libs
In particular config-ml.pl needs to be applied to generated Makefiles
as documented in the manual and we have to avoid clobbering the
variables via make arguments. The explicit install rules used different
ways to construct the multilib dir which isn't necessary and breaks
when MUTLIDIR is now finally set correctly. Instead use
$(toolexeclibdir).
This results in some dead variables in the Makefile.am (and there were
some before), I refrained from doing even more changes here.
Verified with an install with and without --enable-version-specific-runtime-libs
and checking the result.
PR modula2/108144
libgm2/
* configure.ac: Apply config-ml.pl to the generated Makefiles.
Set multilib_arg, use AM_PROG_LIBTOOL.
* configure: Regenerate.
* Makefile.am (AM_MAKEFLAGS): Do not override MULTI* flags.
* Makefile.in: Regenerate.
* libm2cor/Makefile.am: Install to $(toolexeclibdir)$(M2LIBDIR)
rather than $(inst_libdir)/$(MULTIDIR)$(M2LIBDIR).
* libm2iso/Makefile.am: Likewise.
* libm2log/Makefile.am: Likewise.
* libm2min/Makefile.am: Likewise.
* libm2pim/Makefile.am: Likewise.
* libm2cor/Makefile.in: Regenerate.
* libm2iso/Makefile.in: Likewise.
* libm2log/Makefile.in: Likewise.
* libm2min/Makefile.in: Likewise.
* libm2pim/Makefile.in: Likewise.
2023-01-23 08:21:27 +01:00
GCC Administrator
0846336de5
Daily bump.
2023-01-20 00:17:40 +00:00
Richard Biener
1cfaaa4229
modula2/108144 - fix --enable-version-specific-runtime-libs
...
The following fixes --enable-version-specific-runtime-libs for
the modula2 target libraries. The issue is that the install
happens via for example
toolexeclib_LTLIBRARIES = libm2cor.la
and toolexeclibdir is set to $(toolexecdir)/$(gcc_version)$(MULTISUBDIR)
but the Makefile.am do not define $(gcc_version) but instead
$(version) which is used locally to define libsubdir. The fix
is to consistently define and use $(gcc_version), also properly
supporting --with-gcc-major-version-only
PR modula2/108144
libgm2/
* configure.ac: Add GCC_BASE_VER.
* configure: Re-generate.
* Makefile.am: Use @get_gcc_base_ver@ for gcc_version.
* libm2cor/Makefile.am: Likewise. Use gcc_version instead
of version.
* libm2iso/Makefile.am: Likewise.
* libm2log/Makefile.am: Likewise.
* libm2min/Makefile.am: Likewise.
* libm2pim/Makefile.am: Likewise.
* Makefile.in: Re-generate.
* libm2cor/Makefile.in: Likewise.
* libm2iso/Makefile.in: Likewise.
* libm2log/Makefile.in: Likewise.
* libm2min/Makefile.in: Likewise.
* libm2pim/Makefile.in: Likewise.
2023-01-19 14:47:59 +01:00
GCC Administrator
8d07b193d7
Daily bump.
2023-01-18 00:17:21 +00:00
Gaius Mulley
3a121c06f3
PR-108404 M2RTS_Halt fails with a segv
...
PR-108404 occurs because the C prototype does not match the Modula-2
procedure M2RTS_Halt. This patch provides a new procedure M2RTS_HaltC
which avoids the C/C++ code from having to fabricate a Modula-2 string.
gcc/m2/ChangeLog:
* gm2-libs-iso/M2RTS.def (Halt): Parameter file renamed to filename.
(HaltC): New procedure declaration.
(ErrorMessage): Parameter file renamed to filename.
* gm2-libs-iso/M2RTS.mod (Halt): Parameter file renamed to
filename.
(HaltC): New procedure implementation.
(ErrorStringC): New procedure implementation.
(ErrorMessageC): New procedure implementation.
* gm2-libs/M2RTS.def (Halt): Parameter file renamed to filename.
(HaltC): New procedure declaration.
(ErrorMessage): Parameter file renamed to filename.
* gm2-libs/M2RTS.mod (Halt): Parameter file renamed to filename.
(HaltC): New procedure implementation.
(ErrorStringC): New procedure implementation.
(ErrorMessageC): New procedure implementation.
libgm2/ChangeLog:
* libm2iso/RTco.cc (_M2_RTco_fini): Call M2RTS_HaltC.
(newSem): Call M2RTS_HaltC.
(currentThread): Call M2RTS_HaltC.
(never): Call M2RTS_HaltC.
(defined): Call M2RTS_HaltC.
(initThread): Call M2RTS_HaltC.
(RTco_transfer): Call M2RTS_HaltC.
* libm2iso/m2rts.h (M2RTS_Halt): Provide parameter names.
(M2RTS_HaltC): New procedure declaration.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-01-17 13:27:42 +00:00
GCC Administrator
d808db1f7b
Daily bump.
2023-01-07 00:17:28 +00:00
v
53add16251
PR-108294 soname bump for modula2 runtime libraries.
...
The soname for the Modula-2 runtime libraries for the compiler based on
GCC 12 is 17 and didn't change for GCC 13. This patch bumps the version
to 18.
libgm2/ChangeLog:
* configure: Regenerate.
* configure.ac (libtool_VERSION): Bump to 18:0:0.
Signed-off-by: <gaiusmod2@gmail.com>
2023-01-06 04:50:09 +00:00
GCC Administrator
faccda2768
Daily bump.
2023-01-05 00:17:41 +00:00
Iain Sandoe
ec6d1fc09f
modula-2: Fix registration of modules via constructors [PR108183].
...
This reworks the mechanism used for module registration to use init-
time constructors. The order of registration is not important, the
actual initialization dependency tree will be computed early in the
execution (all that matters is that we have registered before that).
This fixes a potential issue in which the external name known to the
m2 system is of the form _M2_XXXXXX_ctor() but the C++ code was
producing a static variable instance with the same name.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
PR modula2/108183
gcc/m2/ChangeLog:
* gm2-libs-ch/UnixArgs.cc (_M2_UnixArgs_ctor): Rework to use
an extern "C" function with 'constructor' attribute.
* gm2-libs-ch/dtoa.cc (_M2_dtoa_ctor): Likewise.
* gm2-libs-ch/ldtoa.cc (_M2_ldtoa_ctor): Likewise.
libgm2/ChangeLog:
* libm2cor/KeyBoardLEDs.cc (_M2_KeyBoardLEDs_ctor): Rework to use
an extern "C" function with 'constructor' attribute.
* libm2iso/ErrnoCategory.cc (_M2_ErrnoCategory_ctor): Likewise.
* libm2iso/RTco.cc (_M2_RTco_ctor): Likewise.
* libm2pim/Selective.cc (_M2_Selective_ctor): Likewise.
* libm2pim/SysExceptions.cc (_M2_SysExceptions_ctor): Likewise.
* libm2pim/UnixArgs.cc (_M2_UnixArgs_ctor): Likewise.
* libm2pim/cgetopt.cc (_M2_cgetopt_ctor): Likewise.
* libm2pim/dtoa.cc (_M2_dtoa_ctor): Likewise.
* libm2pim/errno.cc (_M2_errno_ctor): Likewise.
* libm2pim/ldtoa.cc (_M2_ldtoa_ctor): Likewise.
* libm2pim/sckt.cc (_M2_sckt_ctor): Likewise.
* libm2pim/termios.cc (_M2_termios_ctor): Likewise.
* libm2pim/wrapc.c: Add a new line to the file end.
2023-01-04 14:54:41 +00:00
GCC Administrator
90323d0b4b
Daily bump.
2023-01-01 00:17:17 +00:00
Iain Sandoe
2d8c2fdc29
modula-2,libgm2: Add undefined, dynamic_lookup to m2 libs links.
...
The libm2 libraries are cross-linked, which means that we need to allow
symbols to be undefined at link time and then to be found at runtime.
This is implemented on Darwin by adding -undefined, dynamic_lookup to
the link command.
NOTE: It would probably be a better solution to rework the libraries
either to combine those that have inter-dependencies, or to reorder
the layering so the there is a fixed dependency tree.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
libgm2/ChangeLog:
* configure: Regenerate.
* configure.ac: Make a conditional for configurations targeting
Darwin.
* libm2cor/Makefile.am: Use -undefined,dynamic_lookup on Darwin.
* libm2iso/Makefile.am: Likewise.
* libm2log/Makefile.am: Likewise.
* libm2pim/Makefile.am: Likewise
* libm2min/Makefile.am: Likewise
* libm2cor/Makefile.in: Regenerate.
* libm2iso/Makefile.in: Regenerate.
* libm2log/Makefile.in: Regenerate.
* libm2min/Makefile.in: Regenerate.
* libm2pim/Makefile.in: Regenerate.
2022-12-31 16:16:30 +00:00
Jakub Jelinek
32582c190b
Adjust ChangeLog entries from m2 merge.
...
Fix up ChangeLog formatting...
2022-12-15 13:01:07 +01:00
GCC Administrator
26f4aefaeb
Daily bump.
2022-12-15 00:17:29 +00:00