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.