From f0716643b41aaff6ba37ea629ccead7b2011f618 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sat, 18 Feb 2017 18:16:25 -0800 Subject: Garbage collection for GCC options that are same ... on all supported versions. Signed-off-by: Alexey Neyman --- config/cc/gcc.in.2 | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'config/cc/gcc.in.2') diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2 index aad488b4..6c99f201 100644 --- a/config/cc/gcc.in.2 +++ b/config/cc/gcc.in.2 @@ -96,8 +96,22 @@ config CC_GCC_SYSTEM_ZLIB comment "Optimisation features" # Defined in config/cc/gcc.in +# For graphite: gcc needs cloog and isl +# In >= gcc-5.x, cloog is no longer needed, but isl is. +# Prompt in config/cc/gcc.in.2 config CC_GCC_USE_GRAPHITE - prompt "Enable GRAPHITE loop optimisations" + bool "Enable GRAPHITE loop optimisations" + default y + select CLOOG_NEEDED if !CC_GCC_5_or_later + select ISL_NEEDED + help + Enable the GRAPHITE loop optimsations. + + On some systems (eg. Cygwin), CLooG and ISL (required to enable + GRAPHITE) may not build properly (yet), so you'll have to say 'N' + here (or help debug the issues) + + TODO: Is this still true on Cygwin? # The way LTO works is a bit twisted. # See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements @@ -107,11 +121,11 @@ config CC_GCC_USE_GRAPHITE # - if binutils does not have plugins: LTO is handled by collect2 # In any case, LTO support does not depend on plugins, but takes # advantage of it -# Also, only the 4.5 series needs libelf for LTO; 4.6 has dropped -# the dependency. -# Defined in config/cc/gcc.in config CC_GCC_USE_LTO - prompt "Enable LTO" + bool "Enable LTO" + default y + help + Enable the Link Time Optimisations. #----------------------------------------------------------------------------- comment "Settings for libraries running on target" @@ -258,7 +272,6 @@ config CC_GCC_LDBL_128 config CC_GCC_BUILD_ID bool prompt "Enable build-id" - depends on CC_GCC_HAS_BUILD_ID help Tells GCC to pass --build-id option to the linker for all final links (links performed without the -r or --relocatable option), @@ -271,7 +284,6 @@ config CC_GCC_BUILD_ID choice CC_GCC_LNK_HASH_STYLE_CHOICE bool prompt "linker hash style" - depends on CC_GCC_HAS_LNK_HASH_STYLE depends on BINUTILS_HAS_HASH_STYLE config CC_GCC_LNK_HASH_STYLE_DEFAULT -- cgit v1.2.3 From 264b0c8686051f6a8fe08cc41a34d5225d83e7a6 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sat, 18 Feb 2017 18:41:04 -0800 Subject: More GC Signed-off-by: Alexey Neyman --- config/cc/gcc.in | 10 ---------- config/cc/gcc.in.2 | 2 -- scripts/build/cc/100-gcc.sh | 38 ++++++++++++++++---------------------- 3 files changed, 16 insertions(+), 34 deletions(-) (limited to 'config/cc/gcc.in.2') diff --git a/config/cc/gcc.in b/config/cc/gcc.in index 99bd3d28..a2f75ee1 100644 --- a/config/cc/gcc.in +++ b/config/cc/gcc.in @@ -130,8 +130,6 @@ config CC_GCC_4_8 select CC_GCC_4_8_or_later select CC_GCC_USE_GMP_MPFR select CC_GCC_USE_MPC - select CC_GCC_HAS_LIBQUADMATH - select CC_GCC_HAS_LIBSANITIZER select CC_SUPPORT_GOLANG config CC_GCC_4_8_or_later @@ -142,8 +140,6 @@ config CC_GCC_4_9 select CC_GCC_4_9_or_later select CC_GCC_USE_GMP_MPFR select CC_GCC_USE_MPC - select CC_GCC_HAS_LIBQUADMATH - select CC_GCC_HAS_LIBSANITIZER select CC_SUPPORT_GOLANG config CC_GCC_4_9_or_later @@ -155,8 +151,6 @@ config CC_GCC_5 select CC_GCC_5_or_later select CC_GCC_USE_GMP_MPFR select CC_GCC_USE_MPC - select CC_GCC_HAS_LIBQUADMATH - select CC_GCC_HAS_LIBSANITIZER select CC_GCC_HAS_LIBMPX select CC_SUPPORT_GOLANG @@ -169,8 +163,6 @@ config CC_GCC_6 select CC_GCC_6_or_later select CC_GCC_USE_GMP_MPFR select CC_GCC_USE_MPC - select CC_GCC_HAS_LIBQUADMATH - select CC_GCC_HAS_LIBSANITIZER select CC_GCC_HAS_LIBMPX select CC_SUPPORT_GOLANG @@ -183,8 +175,6 @@ config CC_GCC_latest select CC_GCC_6_or_later select CC_GCC_USE_GMP_MPFR select CC_GCC_USE_MPC - select CC_GCC_HAS_LIBQUADMATH - select CC_GCC_HAS_LIBSANITIZER # Only enable gcc's support for plugins if binutils has it as well # They are useful only when doing LTO, but it does no harm enabling diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2 index 6c99f201..8818de6e 100644 --- a/config/cc/gcc.in.2 +++ b/config/cc/gcc.in.2 @@ -177,7 +177,6 @@ config CC_GCC_LIBSSP config CC_GCC_LIBQUADMATH bool prompt "Compile libquadmath" - depends on CC_GCC_HAS_LIBQUADMATH help libquadmath is a library which provides quad-precision mathematical functions on targets supporting the __float128 datatype. See: @@ -188,7 +187,6 @@ config CC_GCC_LIBQUADMATH config CC_GCC_LIBSANITIZER bool prompt "Compile libsanitizer" - depends on CC_GCC_HAS_LIBSANITIZER depends on THREADS_NATIVE depends on ! LIBC_uClibc && ! LIBC_musl # Currently lacks required headers (like netrom.h) help diff --git a/scripts/build/cc/100-gcc.sh b/scripts/build/cc/100-gcc.sh index e14b5102..43488a24 100644 --- a/scripts/build/cc/100-gcc.sh +++ b/scripts/build/cc/100-gcc.sh @@ -434,14 +434,12 @@ do_gcc_core_backend() { else extra_config+=(--disable-libssp) fi - if [ "${CT_CC_GCC_HAS_LIBQUADMATH}" = "y" ]; then - if [ "${CT_CC_GCC_LIBQUADMATH}" = "y" ]; then - extra_config+=(--enable-libquadmath) - extra_config+=(--enable-libquadmath-support) - else - extra_config+=(--disable-libquadmath) - extra_config+=(--disable-libquadmath-support) - fi + if [ "${CT_CC_GCC_LIBQUADMATH}" = "y" ]; then + extra_config+=(--enable-libquadmath) + extra_config+=(--enable-libquadmath-support) + else + extra_config+=(--disable-libquadmath) + extra_config+=(--disable-libquadmath-support) fi core_LDFLAGS+=("${ldflags}") @@ -928,22 +926,18 @@ do_gcc_backend() { else extra_config+=(--disable-libssp) fi - if [ "${CT_CC_GCC_HAS_LIBQUADMATH}" = "y" ]; then - if [ "${CT_CC_GCC_LIBQUADMATH}" = "y" ]; then - extra_config+=(--enable-libquadmath) - extra_config+=(--enable-libquadmath-support) - else - extra_config+=(--disable-libquadmath) - extra_config+=(--disable-libquadmath-support) - fi + if [ "${CT_CC_GCC_LIBQUADMATH}" = "y" ]; then + extra_config+=(--enable-libquadmath) + extra_config+=(--enable-libquadmath-support) + else + extra_config+=(--disable-libquadmath) + extra_config+=(--disable-libquadmath-support) fi - if [ "${CT_CC_GCC_HAS_LIBSANITIZER}" = "y" ]; then - if [ "${CT_CC_GCC_LIBSANITIZER}" = "y" ]; then - extra_config+=(--enable-libsanitizer) - else - extra_config+=(--disable-libsanitizer) - fi + if [ "${CT_CC_GCC_LIBSANITIZER}" = "y" ]; then + extra_config+=(--enable-libsanitizer) + else + extra_config+=(--disable-libsanitizer) fi if [ "${CT_CC_GCC_HAS_LIBMPX}" = "y" ]; then -- cgit v1.2.3 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 --- config/cc/gcc.in.2 | 1 + scripts/build/cc/100-gcc.sh | 2 ++ 2 files changed, 3 insertions(+) (limited to 'config/cc/gcc.in.2') diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2 index 8818de6e..638bfe93 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 43488a24..91ddd3da 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 v1.2.3