public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/107630] New: runtime libs should be self-contained
@ 2022-11-11  9:12 ro at gcc dot gnu.org
  2023-03-15 23:20 ` [Bug modula2/107630] " gaius at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ro at gcc dot gnu.org @ 2022-11-11  9:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107630

            Bug ID: 107630
           Summary: runtime libs should be self-contained
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: modula2
          Assignee: gaius at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
  Target Milestone: ---

Prompted by PR modula2/107629, I checked the runtime libs on Solaris and Linux,
and (not unexpectedly) found the same issue: with the exception of libm2min.so,
none of the gm2 runtime libs are self-contained, each containing tons of
undefined
references.  This is considered bad style at least (cf. the libtool manual,
among others), and with a small (and intentional) exception in libgo.so, all
other gcc runtime libs are, as they should be.

It would be good if libgm2 would follow suite, making PR modula2/107629
vanish.

I've had a quick look myself, but things seem not so easy since some of the
unresolved symbols are defined in several of the other runtime libs, plus there
are references to completely difference libs (libm2pim -> libstdc++) or objects
(libm2pim -> gm2-gcc/init.o).

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug modula2/107630] runtime libs should be self-contained
  2022-11-11  9:12 [Bug modula2/107630] New: runtime libs should be self-contained ro at gcc dot gnu.org
@ 2023-03-15 23:20 ` gaius at gcc dot gnu.org
  2023-03-15 23:31 ` gaius at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-03-15 23:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107630

Gaius Mulley <gaius at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gaius at gcc dot gnu.org

--- Comment #1 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Created attachment 54676
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54676&action=edit
Refactor Debug.mod and Storage.mod

Here is a patch which starts to refactor the libraries.  It removes the m2cor
Debug.mod and all remaining libraries use the m2pim Debug.mod.  It also layers
m2iso Storage and m2pim Storage to use SysStorage.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug modula2/107630] runtime libs should be self-contained
  2022-11-11  9:12 [Bug modula2/107630] New: runtime libs should be self-contained ro at gcc dot gnu.org
  2023-03-15 23:20 ` [Bug modula2/107630] " gaius at gcc dot gnu.org
@ 2023-03-15 23:31 ` gaius at gcc dot gnu.org
  2023-03-15 23:36 ` gaius at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-03-15 23:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107630

Gaius Mulley <gaius at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-03-15
             Status|UNCONFIRMED                 |ASSIGNED

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug modula2/107630] runtime libs should be self-contained
  2022-11-11  9:12 [Bug modula2/107630] New: runtime libs should be self-contained ro at gcc dot gnu.org
  2023-03-15 23:20 ` [Bug modula2/107630] " gaius at gcc dot gnu.org
  2023-03-15 23:31 ` gaius at gcc dot gnu.org
@ 2023-03-15 23:36 ` gaius at gcc dot gnu.org
  2023-03-16 20:37 ` cvs-commit at gcc dot gnu.org
  2023-03-22  1:46 ` cvs-commit at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-03-15 23:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107630

Gaius Mulley <gaius at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #54676|0                           |1
        is obsolete|                            |

--- Comment #2 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Created attachment 54677
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54677&action=edit
Refactor libgm2 version 2

A new patch which has the debugging trace disabled (within Storage.mod).

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug modula2/107630] runtime libs should be self-contained
  2022-11-11  9:12 [Bug modula2/107630] New: runtime libs should be self-contained ro at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-03-15 23:36 ` gaius at gcc dot gnu.org
@ 2023-03-16 20:37 ` cvs-commit at gcc dot gnu.org
  2023-03-22  1:46 ` cvs-commit at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-16 20:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107630

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Gaius Mulley <gaius@gcc.gnu.org>:

https://gcc.gnu.org/g:77924dff144cf934e7a73417d237a99f0d9d66ed

commit r13-6718-g77924dff144cf934e7a73417d237a99f0d9d66ed
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Thu Mar 16 20:34:32 2023 +0000

    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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug modula2/107630] runtime libs should be self-contained
  2022-11-11  9:12 [Bug modula2/107630] New: runtime libs should be self-contained ro at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-03-16 20:37 ` cvs-commit at gcc dot gnu.org
@ 2023-03-22  1:46 ` cvs-commit at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-22  1:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107630

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Gaius Mulley <gaius@gcc.gnu.org>:

https://gcc.gnu.org/g:573dbd5175dbf16a3b4551ec55800febf0d1b617

commit r13-6795-g573dbd5175dbf16a3b4551ec55800febf0d1b617
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Wed Mar 22 01:45:58 2023 +0000

    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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-03-22  1:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-11  9:12 [Bug modula2/107630] New: runtime libs should be self-contained ro at gcc dot gnu.org
2023-03-15 23:20 ` [Bug modula2/107630] " gaius at gcc dot gnu.org
2023-03-15 23:31 ` gaius at gcc dot gnu.org
2023-03-15 23:36 ` gaius at gcc dot gnu.org
2023-03-16 20:37 ` cvs-commit at gcc dot gnu.org
2023-03-22  1:46 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).