diff --git a/config/binutils/binutils.in b/config/binutils/binutils.in index 173aacf7..94190f4e 100644 --- a/config/binutils/binutils.in +++ b/config/binutils/binutils.in @@ -62,10 +62,14 @@ config BINUTILS_VERSION config BINUTILS_2_21_or_later bool select BINUTILS_HAS_GOLD + select BINUTILS_HAS_PLUGINS config BINUTILS_HAS_GOLD bool +config BINUTILS_HAS_PLUGINS + bool + if BINUTILS_HAS_GOLD choice @@ -128,6 +132,15 @@ config BINUTILS_LINKERS_LIST endif # BINUTILS_HAS_GOLD +config BINUTILS_PLUGINS + bool + prompt "Enable support for plugins" + depends on BINUTILS_HAS_PLUGINS + help + binutils can be extended through the use of plugins. + Especially, gold can use the lto-plugin, as installed + by gcc, to handle LTO. + config BINUTILS_EXTRA_CONFIG string prompt "binutils extra config" diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh index 39fa61cd..1a7e33ca 100644 --- a/scripts/build/binutils/binutils.sh +++ b/scripts/build/binutils/binutils.sh @@ -43,6 +43,9 @@ do_binutils() { ;; esac fi + if [ "${CT_BINUTILS_PLUGINS}" = "y" ]; then + extra_config+=( --enable-plugins ) + fi CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"