set optstr "$includes $extra_flags -DIN_GCC -fPIC -shared"
+ if { [ ishost *-*-darwin* ] } {
+ set optstr [concat $optstr "-undefined dynamic_lookup"]
+ }
+
# Temporarily switch to the environment for the plugin compiler.
restore_ld_library_path_env_vars
set status [remote_exec build "$PLUGINCC $PLUGINCFLAGS $plugin_src $optstr -o $plugin_lib"]