From 45512b003d04b5a89c5c3bb6b674683d82b87f42 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sat, 18 Feb 2017 19:00:25 -0800 Subject: Have LTO depend-on non-static builds Loading a dynamic library (LTO plugin) from a static binary fails on ArchLinux. It is also prone to break if a system is ever upgraded. Also, disable plugins if not enabled explicitly. Signed-off-by: Alexey Neyman diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2 index 8818de6..638bfe9 100644 --- a/config/cc/gcc.in.2 +++ b/config/cc/gcc.in.2 @@ -124,6 +124,7 @@ config CC_GCC_USE_GRAPHITE config CC_GCC_USE_LTO bool "Enable LTO" default y + depends on ! STATIC_TOOLCHAIN help Enable the Link Time Optimisations. diff --git a/scripts/build/cc/100-gcc.sh b/scripts/build/cc/100-gcc.sh index 43488a2..91ddd3d 100644 --- a/scripts/build/cc/100-gcc.sh +++ b/scripts/build/cc/100-gcc.sh @@ -1050,6 +1050,8 @@ do_gcc_backend() { if [ "${CT_CC_GCC_ENABLE_PLUGINS}" = "y" ]; then extra_config+=( --enable-plugin ) + else + extra_config+=( --disable-plugin ) fi if [ "${CT_CC_GCC_GOLD}" = "y" ]; then extra_config+=( --enable-gold ) -- cgit v0.10.2-6-g49f6