https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108183
--- Comment #17 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to Iain Sandoe from comment #16) > Created attachment 54170 [details] > Patch registration constructors > > This modifies the registration CTORs that are currently defined in C++ to be > defined as 'extern "C"' and registered to be run at program load time. > > This is as described in comments #14 and 15. I did not post this yet - because I was wondering if there is more needed (i.e. that the code-gen should also do something similar when .mods are compiled). For example, if I take a random test case, and examine the symbols - I see these CTORs - but I do not see any CTORs for non-library modules. Of course, that could also be a separate patch - don't think I know the m2 sources well enough to attempt it at present, tho.