X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=config%2Fgcc-plugin.m4;h=38b2ae6e12e6b5d0d3b9cdfd88eebeaec6841596;hb=bf41f30dde0f2ad09c2b7a9894fd7992e4b36a16;hp=dd06a58cd1329aaee15b1e8624467dbd2e91a1f4;hpb=2a8ae7146cacb006105e2e9c6f4635aca543e7ec;p=deliverable%2Fbinutils-gdb.git diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4 index dd06a58cd1..38b2ae6e12 100644 --- a/config/gcc-plugin.m4 +++ b/config/gcc-plugin.m4 @@ -19,8 +19,21 @@ AC_DEFUN([GCC_ENABLE_PLUGINS], enable_plugin=yes; default_plugin=yes) pluginlibs= + plugin_check=yes case "${host}" in + *-*-mingw*) + # Since plugin support under MinGW is not as straightforward as on + # other platforms (e.g., we have to link import library, etc), we + # only enable it if explicitly requested. + if test x"$default_plugin" = x"yes"; then + enable_plugin=no + elif test x"$enable_plugin" = x"yes"; then + # Use make's target variable to derive import library name. + pluginlibs='-Wl,--export-all-symbols -Wl,--out-implib=[$]@.a' + plugin_check=no + fi + ;; *-*-darwin*) if test x$build = x$host; then export_sym_check="nm${exeext} -g" @@ -41,7 +54,7 @@ AC_DEFUN([GCC_ENABLE_PLUGINS], ;; esac - if test x"$enable_plugin" = x"yes"; then + if test x"$enable_plugin" = x"yes" -a x"$plugin_check" = x"yes"; then AC_MSG_CHECKING([for exported symbols]) if test "x$export_sym_check" != x; then