# HG changeset patch # User "Yann E. MORIN" # Date 1367769540 -7200 # Node ID 15eedf548d3306f79b5f948565c4026cb1f0e1d5 # Parent bfad02f03c75f9401bc87e3d7876237107e613e8 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 -r bfad02f03c75 -r 15eedf548d33 config/cc/gcc.in --- a/config/cc/gcc.in Sat May 04 00:08:34 2013 +0200 +++ b/config/cc/gcc.in Sun May 05 17:59:00 2013 +0200 @@ -316,9 +316,25 @@ bool select CC_GCC_4_6_or_later +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_7_or_later + 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_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_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 @@ 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 -r bfad02f03c75 -r 15eedf548d33 config/cc/gcc.in.2 --- a/config/cc/gcc.in.2 Sat May 04 00:08:34 2013 +0200 +++ b/config/cc/gcc.in.2 Sun May 05 17:59:00 2013 +0200 @@ -70,20 +70,9 @@ 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 @@ # 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 -r bfad02f03c75 -r 15eedf548d33 scripts/build/cc/gcc.sh --- a/scripts/build/cc/gcc.sh Sat May 04 00:08:34 2013 +0200 +++ b/scripts/build/cc/gcc.sh Sun May 05 17:59:00 2013 +0200 @@ -282,15 +282,21 @@ 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 @@ 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