https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107612
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Iain D Sandoe <ia...@gcc.gnu.org>: https://gcc.gnu.org/g:ebc41f9a817dbae01c7450cd33c1968318ce8df0 commit r13-4939-gebc41f9a817dbae01c7450cd33c1968318ce8df0 Author: Rainer Orth <r...@cebitec.uni-bielefeld.de> Date: Thu Dec 15 10:43:37 2022 +0000 modula-2: Fix building the plugin for Darwin [PR107612]. * Makes the configured value for INCINTL available as a variable so that it can be used in language makefile fragements. It is then used in the m2 fragment to make the include path available to the plugin compile. * Updates the DSO suffix to use .dylib for Darwin. * Adds '-Wl,-undefined,dynamic_lookup' to the link flags so that symbols can be resolved at runtime. * Removes the extraneous $(exeext) from the DSO names. Since the linking is driven by CXX, we also need to supress the addition of default libraries otherwise: (1) we will get a reference to an uninstalled libstdc++ (2) the process opening the plugin would have two instances 0f libstdc++ - one statically linked into gm2 and one dynamically linked into the plugin. PR modula2/107612 gcc/ChangeLog: * Makefile.in: Make the configured libintl includes avaiable in INCINTL. (BUILD_CPPFLAGS): Use INCINTL. gcc/m2/ChangeLog: * Make-lang.in (soext): Use .dylib for Darwin. (PLUGINLDFLAGS): Use dynmic lookup, set the plugin name, and append -nodefaultlibs to suppress the linking of libstdc++. Use INCINTL in compile lines for the plugin. Co-Authored-By: Iain Sandoe <i...@sandoe.co.uk>