https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107629
Bug ID: 107629 Summary: runtime libs don't link on macOS 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: --- Host: x86_64-apple-darwin11.4.2 Target: x86_64-apple-darwin11.4.2 Build: x86_64-apple-darwin11.4.2 The gm2 runtime libs don't link on macOS, e.g. libm2log: Undefined symbols for architecture x86_64: "_DynamicStrings_ConCat", referenced from: _FileSystem_Create in FileSystem.o _InOut_OpenInput in InOut.o _InOut_OpenOutput in InOut.o _RealConversions_LongRealToString in RealConversions.o _Pad.part.0 in RealInOut.o _Strings_Delete in Strings.o _Strings_Insert in Strings.o ... and many more. While libtool knows about the ld option to lift that requirement, there seems to be no way to activate it. For now, I've just manually added LDFLAGS = -Wl,-undefined -Wl,dynamic_lookup to the various libgm2 Makefiles. I suspect something along the lines of libitm/configure.tgt or libsanitizer/configure.tgt will be necessary to handle this for real. However, the best way would be to make the libs self-contained, actually, so the issue would just vanish.