summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authortschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-13 14:32:16 +0000
committertschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-13 14:32:16 +0000
commit1015a06374f096ebe57068dcb997d881f5af26b3 (patch)
treee212e86d892a2b16bd0d28b485cffc6105c5c8db /configure.ac
parentbf0001d46560bfef90b4822ebde0e0fc4caeb817 (diff)
downloadgcc-1015a06374f096ebe57068dcb997d881f5af26b3.tar.gz
Non-host system configuration for linker plugins.
* configure.ac (--enable-linker-plugin-configure-flags) (--enable-linker-plugin-flags): New flags. (configdirs): Conditionally add libiberty-linker-plugin. * configure: Regenerate. * Makefile.def (host_modules): Add libiberty-linker-plugin. (host_modules) <lto-plugin>: Pay attention to @extra_linker_plugin_flags@ and @extra_linker_plugin_configure_flags@. (all-lto-plugin): Also depend on all-libiberty-linker-plugin. * Makefile.in: Regenerate. gcc/ * doc/install.texi (--enable-linker-plugin-configure-flags) (--enable-linker-plugin-flags): Document new flags. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211644 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac28
1 files changed, 28 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 548525b19ff..9048cd1cd7f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1731,6 +1731,19 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always.
esac
])
+AC_ARG_ENABLE(linker-plugin-configure-flags,
+ [AS_HELP_STRING([[--enable-linker-plugin-configure-flags=FLAGS]],
+ [additional flags for configuring linker plugins @<:@none@:>@])],
+ extra_linker_plugin_configure_flags=$enableval,
+ extra_linker_plugin_configure_flags=)
+AC_SUBST(extra_linker_plugin_configure_flags)
+AC_ARG_ENABLE(linker-plugin-flags,
+ [AS_HELP_STRING([[--enable-linker-plugin-flags=FLAGS]],
+ [additional flags for configuring and building linker plugins @<:@none@:>@])],
+ extra_linker_plugin_flags=$enableval,
+ extra_linker_plugin_flags=)
+AC_SUBST(extra_linker_plugin_flags)
+
# By default, C and C++ are the only stage 1 languages.
stage1_languages=,c,
@@ -2141,6 +2154,21 @@ for i in ${target_configdirs_all} ; do
fi
done
+# libiberty-linker-plugin is special: it doesn't have its own source directory,
+# so we have to add it after the preceding checks.
+if test x"$extra_linker_plugin_flags$extra_linker_plugin_configure_flags" != x
+then
+ case " $configdirs " in
+ *" libiberty "*)
+ # If we can build libiberty, we can also build libiberty-linker-plugin.
+ configdirs="$configdirs libiberty-linker-plugin"
+ extra_linker_plugin_configure_flags="$extra_linker_plugin_configure_flags \
+ --with-libiberty=../libiberty-linker-plugin";;
+ *)
+ AC_MSG_ERROR([libiberty missing]);;
+ esac
+fi
+
# Produce a warning message for the subdirs we can't configure.
# This isn't especially interesting in the Cygnus tree, but in the individual
# FSF releases, it's important to let people know when their machine isn't