Index: gcc-47/src/gcc/configure.ac =================================================================== --- gcc-47.orig/src/gcc/configure.ac 2014-04-18 16:34:16.921944411 +0400 +++ gcc-47/src/gcc/configure.ac 2014-04-18 16:37:04.187748582 +0400 @@ -5169,15 +5169,21 @@ : # No need to use a flag AC_MSG_RESULT([yes]) else - AC_MSG_RESULT([yes]) AC_MSG_CHECKING([for -rdynamic]) ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest$ac_exeext > /dev/null 2>&1 if $export_sym_check conftest$ac_exeext | grep -q foobar > /dev/null; then plugin_rdynamic=yes pluginlibs="-rdynamic" else - plugin_rdynamic=no - enable_plugin=no + AC_MSG_CHECKING([for -Wl,-export-dynamic]) + ${CC} ${CFLAGS} ${LDFLAGS} -Wl,-export-dynamic conftest.c -o conftest > /dev/null 2>&1 + if $export_sym_check conftest | grep foobar > /dev/null; then + plugin_rdynamic=yes + pluginlibs="-Wl,-export-dynamic" + else + plugin_rdynamic=no + enable_plugin=no + fi fi AC_MSG_RESULT([$plugin_rdynamic]) fi