diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/ChangeLog | 4 | ||||
-rw-r--r-- | config/gcc-plugin.m4 | 28 |
2 files changed, 32 insertions, 0 deletions
diff --git a/config/ChangeLog b/config/ChangeLog index f2be325..1ec5847 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2021-01-09 H.J. Lu <hongjiu.lu@intel.com> + + * gcc-plugin.m4 (GCC_PLUGIN_OPTION): New. + 2021-01-09 Nick Clifton <nickc@redhat.com> * 2.36 release branch crated. diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4 index 8f27871..c5b72e9 100644 --- a/config/gcc-plugin.m4 +++ b/config/gcc-plugin.m4 @@ -124,3 +124,31 @@ AC_DEFUN([GCC_ENABLE_PLUGINS], fi fi ]) + +dnl +dnl +dnl GCC_PLUGIN_OPTION +dnl (SHELL-CODE_HANDLER) +dnl +AC_DEFUN([GCC_PLUGIN_OPTION],[dnl +AC_MSG_CHECKING([for -plugin option]) + +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done +if test -n "$plugin_option"; then + $1="$plugin_option" + AC_MSG_RESULT($plugin_option) +else + AC_MSG_RESULT([no]) +fi +]) |