summaryrefslogtreecommitdiffstats
path: root/package/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'package/gcc')
-rw-r--r--package/gcc/Config.in.host7
-rw-r--r--package/gcc/gcc.mk4
2 files changed, 11 insertions, 0 deletions
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index e07d881444..1a5281ca5b 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -116,6 +116,13 @@ config BR2_GCC_ENABLE_TLS
Enable the compiler to generate code for accessing
thread local storage variables
+config BR2_GCC_ENABLE_LTO
+ bool "Enable compiler link-time-optimization support"
+ select BR2_BINUTILS_ENABLE_LTO
+ help
+ This option enables link-time optimization (LTO) support in
+ gcc.
+
config BR2_GCC_ENABLE_OPENMP
bool "Enable compiler OpenMP support"
depends on !BR2_PTHREADS_NONE && !BR2_arc && !BR2_microblaze
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index ffac15c786..b5d2ddba1e 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -132,6 +132,10 @@ else
HOST_GCC_COMMON_CONF_OPTS += --disable-tls
endif
+ifeq ($(BR2_GCC_ENABLE_LTO),y)
+HOST_GCC_COMMON_CONF_OPTS += --enable-plugins --enable-lto
+endif
+
ifeq ($(BR2_GCC_ENABLE_LIBMUDFLAP),y)
HOST_GCC_COMMON_CONF_OPTS += --enable-libmudflap
else
OpenPOWER on IntegriCloud