Skip to content

Commit

Permalink
Have LTO depend-on non-static builds
Browse files Browse the repository at this point in the history
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 <stilor@att.net>
  • Loading branch information
stilor committed Feb 19, 2017
1 parent 31e7cd6 commit 45512b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/cc/gcc.in.2
Expand Up @@ -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.

Expand Down
2 changes: 2 additions & 0 deletions scripts/build/cc/100-gcc.sh
Expand Up @@ -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 )
Expand Down

0 comments on commit 45512b0

Please sign in to comment.