From 1dc3dd91672d2742d294429b8427b548ee2ba85a Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 5 May 2013 17:59:00 +0200 Subject: cc/gcc: add preliminray support for 4.8 This means: - introduce the new symbols for 4.8 - do not always select PPL if graphite is selected Reported-by: "Plotnikov Dmitry" [Dmitry did a preliminray patch to add gcc-4.8 support, which this patch is inspired from] Signed-off-by: "Yann E. MORIN" diff --git a/config/cc/gcc.in b/config/cc/gcc.in index a0b23a8..cf733ac 100644 --- a/config/cc/gcc.in +++ b/config/cc/gcc.in @@ -316,9 +316,25 @@ config CC_GCC_4_7_or_later bool select CC_GCC_4_6_or_later -config CC_GCC_latest +config CC_GCC_4_8 + bool + select CC_GCC_4_8_or_later + select CC_GCC_USE_GMP_MPFR + select CC_GCC_USE_MPC + select CC_GCC_HAS_GRAPHITE + select CC_GCC_HAS_LTO + select CC_GCC_HAS_PKGVERSION_BUGURL + select CC_GCC_HAS_BUILD_ID + select CC_GCC_HAS_LNK_HASH_STYLE + select CC_GCC_HAS_LIBQUADMATH + +config CC_GCC_4_8_or_later bool select CC_GCC_4_7_or_later + +config CC_GCC_latest + bool + select CC_GCC_4_8_or_later select CC_GCC_USE_GMP_MPFR select CC_GCC_USE_MPC select CC_GCC_HAS_GRAPHITE @@ -331,6 +347,22 @@ config CC_GCC_latest config CC_GCC_HAS_GRAPHITE bool +# For graphite: gcc 4.4..4.7 need ppl, while 4.8.. need isl +# Prompt in config/cc/gcc.in.2 +config CC_GCC_USE_GRAPHITE + bool + default y + depends on CC_GCC_HAS_GRAPHITE + select CLOOG_NEEDED + select PPL_NEEDED if !CC_GCC_4_8_or_later + select ISL_NEEDED if CC_GCC_4_8_or_later + help + Enable the GRAPHITE loop optimsations. + + On some systems (eg. Cygwin), PPL and/or CLooG (required to enable + GRAPHITE) may not build properly (yet), so you'll have to say 'N' + here (or help debug the issues) + # The way LTO works is a bit twisted. # See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements # Basically: @@ -342,6 +374,15 @@ config CC_GCC_HAS_GRAPHITE config CC_GCC_HAS_LTO bool +# Prompt in config/cc/gcc.in.2 +config CC_GCC_USE_LTO + bool + default y + depends on CC_GCC_HAS_LTO + select CC_GCC_USE_LIBELF if CC_GCC_4_5 + help + Enable the Link Time Optimisations. + config CC_GCC_HAS_PKGVERSION_BUGURL bool @@ -371,9 +412,6 @@ config CC_GCC_USE_GMP_MPFR select GMP_NEEDED select MPFR_NEEDED -config CC_GCC_USE_PPL_CLOOG - bool - select PPL_NEEDED select CLOOG_NEEDED config CC_GCC_USE_MPC diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2 index f445c78..20b70d8 100644 --- a/config/cc/gcc.in.2 +++ b/config/cc/gcc.in.2 @@ -70,20 +70,9 @@ config CC_GCC_SYSTEM_ZLIB comment "Optimisation features" +# Defined in config/cc/gcc.in config CC_GCC_USE_GRAPHITE - bool prompt "Enable GRAPHITE loop optimisations" - default y - depends on CC_GCC_HAS_GRAPHITE - select CC_GCC_USE_PPL_CLOOG - help - Enable the GRAPHITE loop optimsations. - - This requires the PPL and CLooG companion libraries, and - those will be automatically build for you. - - On some systems (eg. Cygwin), PPL and/or CLooG may not - build properly (yet), so you'll have to say 'N' here. # The way LTO works is a bit twisted. # See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements @@ -95,17 +84,9 @@ config CC_GCC_USE_GRAPHITE # 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 - bool prompt "Enable LTO" - default y - depends on CC_GCC_HAS_LTO - select CC_GCC_USE_LIBELF if CC_GCC_4_5 - help - Enable the Link Time Optimisations. - - This will require the libelf companion library, and it - wil be build automatically for you. #----------------------------------------------------------------------------- comment "Settings for libraries running on target" diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index eacff1a..e6dc6db 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -282,15 +282,21 @@ do_cc_core_backend() { extra_config+=("--with-mpc=${complibs}") fi if [ "${CT_CC_GCC_USE_GRAPHITE}" = "y" ]; then - extra_config+=("--with-ppl=${complibs}") - # With PPL 0.11+, also pull libpwl if needed - if [ "${CT_PPL_NEEDS_LIBPWL}" = "y" ]; then - host_libstdcxx_flags+=("-L${complibs}/lib") - host_libstdcxx_flags+=("-lpwl") + if [ "${CT_PPL}" = "y" ]; then + extra_config+=("--with-ppl=${complibs}") + # With PPL 0.11+, also pull libpwl if needed + if [ "${CT_PPL_NEEDS_LIBPWL}" = "y" ]; then + host_libstdcxx_flags+=("-L${complibs}/lib") + host_libstdcxx_flags+=("-lpwl") + fi + fi + if [ "${CT_ISL}" = "y" ]; then + extra_config+=("--with-isl=${complibs}") fi extra_config+=("--with-cloog=${complibs}") elif [ "${CT_CC_GCC_HAS_GRAPHITE}" = "y" ]; then extra_config+=("--with-ppl=no") + extra_config+=("--with-isl=no") extra_config+=("--with-cloog=no") fi if [ "${CT_CC_GCC_USE_LTO}" = "y" ]; then @@ -694,15 +700,21 @@ do_cc_backend() { extra_config+=("--with-mpc=${complibs}") fi if [ "${CT_CC_GCC_USE_GRAPHITE}" = "y" ]; then - extra_config+=("--with-ppl=${complibs}") - # With PPL 0.11+, also pull libpwl if needed - if [ "${CT_PPL_NEEDS_LIBPWL}" = "y" ]; then - host_libstdcxx_flags+=("-L${complibs}/lib") - host_libstdcxx_flags+=("-lpwl") + if [ "${CT_PPL}" = "y" ]; then + extra_config+=("--with-ppl=${complibs}") + # With PPL 0.11+, also pull libpwl if needed + if [ "${CT_PPL_NEEDS_LIBPWL}" = "y" ]; then + host_libstdcxx_flags+=("-L${complibs}/lib") + host_libstdcxx_flags+=("-lpwl") + fi + fi + if [ "${CT_ISL}" = "y" ]; then + extra_config+=("--with-isl=${complibs}") fi extra_config+=("--with-cloog=${complibs}") elif [ "${CT_CC_GCC_HAS_GRAPHITE}" = "y" ]; then extra_config+=("--with-ppl=no") + extra_config+=("--with-isl=no") extra_config+=("--with-cloog=no") fi if [ "${CT_CC_GCC_USE_LTO}" = "y" ]; then -- cgit v0.10.2-6-g49f6