complibs: split-up selection for individual libs
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed Feb 17 23:47:47 2010 +0100 (2010-02-17)
changeset 1808a1370757e6a1
parent 1807 4201b5881a7e
child 1809 b488b4815f9b
complibs: split-up selection for individual libs
config/binutils/binutils.in
config/cc/gcc.in
config/companion_libs.in
config/debug/gdb.in
scripts/build/binutils/binutils.sh
scripts/build/cc/gcc.sh
scripts/build/companion_libs/cloog.sh
scripts/build/companion_libs/gmp.sh
scripts/build/companion_libs/mpc.sh
scripts/build/companion_libs/mpfr.sh
scripts/build/companion_libs/ppl.sh
scripts/build/debug/300-gdb.sh
scripts/showSamples.sh
     1.1 --- a/config/binutils/binutils.in	Tue Feb 09 22:50:53 2010 +0100
     1.2 +++ b/config/binutils/binutils.in	Wed Feb 17 23:47:47 2010 +0100
     1.3 @@ -79,7 +79,8 @@
     1.4      bool
     1.5      prompt "Use GMP and MPFR"
     1.6      default n
     1.7 -    select GMP_MPFR
     1.8 +    select GMP
     1.9 +    select MPFR
    1.10      select COMP_LIBS_TARGET
    1.11      help
    1.12        binutils can be configured to use GMP and MPFR.
     2.1 --- a/config/cc/gcc.in	Tue Feb 09 22:50:53 2010 +0100
     2.2 +++ b/config/cc/gcc.in	Wed Feb 17 23:47:47 2010 +0100
     2.3 @@ -102,13 +102,16 @@
     2.4  config CC_GCC_4_3_or_later
     2.5      bool
     2.6      default n
     2.7 -    select GMP_MPFR
     2.8 +    select GMP
     2.9 +    select MPFR
    2.10  
    2.11  config CC_GCC_4_4_or_later
    2.12      bool
    2.13      default n
    2.14      select CC_GCC_4_3_or_later
    2.15 -    select PPL_CLOOG_MPC
    2.16 +    select PPL
    2.17 +    select CLOOG
    2.18 +    select MPC
    2.19  
    2.20  config CC_VERSION
    2.21      string
     3.1 --- a/config/companion_libs.in	Tue Feb 09 22:50:53 2010 +0100
     3.2 +++ b/config/companion_libs.in	Wed Feb 17 23:47:47 2010 +0100
     3.3 @@ -4,20 +4,22 @@
     3.4  
     3.5  menu "Companion libraries"
     3.6  
     3.7 +comment "FIXME: check real dependencies!!!"
     3.8 +
     3.9  config WRAPPER_NEEDED
    3.10      bool
    3.11      default n
    3.12  
    3.13 -config GMP_MPFR
    3.14 +config GMP
    3.15      bool
    3.16 -    prompt "GMP and MPFR"
    3.17 +    prompt "GMP"
    3.18      select WRAPPER_NEEDED
    3.19      help
    3.20 -      gcc 4.3.0 and above requires both GMP and MPFR to build some frontends,
    3.21 -      and some other components can use them as well.
    3.22 +      gcc 4.3.0 and above requires GMP to build some frontends, and some
    3.23 +      other components can use them as well.
    3.24        
    3.25 -      These will be automatically selected if you choose gcc>=4.3.0, but you
    3.26 -      can say 'Y' here if you want to build those two libraries for the other
    3.27 +      This will be automatically selected if you choose gcc>=4.3.0, but you
    3.28 +      can say 'Y' here if you want to build this library for the other
    3.29        components (that don't select them by default).
    3.30        
    3.31        The packages that can use GMP and MPFR are:
    3.32 @@ -25,31 +27,83 @@
    3.33          - gcc
    3.34          - gdb
    3.35  
    3.36 -if GMP_MPFR
    3.37 +config MPFR
    3.38 +    bool
    3.39 +    prompt "MPFR"
    3.40 +    select GMP
    3.41 +    select WRAPPER_NEEDED
    3.42 +    help
    3.43 +      gcc 4.3.0 and above requires MPFR to build some frontends, and some
    3.44 +      other components can use them as well.
    3.45 +      
    3.46 +      This will be automatically selected if you choose gcc>=4.3.0, but you
    3.47 +      can say 'Y' here if you want to build this library for the other
    3.48 +      components (that don't select them by default).
    3.49 +      
    3.50 +      The packages that can use GMP and MPFR are:
    3.51 +        - binutils
    3.52 +        - gcc
    3.53 +        - gdb
    3.54 +
    3.55 +config PPL
    3.56 +    bool
    3.57 +    prompt "PPL"
    3.58 +    select GMP
    3.59 +    select MPFR
    3.60 +    select WRAPPER_NEEDED
    3.61 +    help
    3.62 +      gcc-4.4.0 and above requires PPL to build some parts of the optimiser
    3.63 +      (the GRAPHITE loop optimisation, to be precise).
    3.64 +      
    3.65 +      This will be automatically selected if you choose gcc>=4.4.0, but you
    3.66 +      can say 'Y' here, although it is unknown yet if any other component
    3.67 +      can use it.
    3.68 +
    3.69 +config CLOOG
    3.70 +    bool
    3.71 +    prompt "GLooG/PPL"
    3.72 +    select GMP
    3.73 +    select MPFR
    3.74 +    select PPL
    3.75 +    select WRAPPER_NEEDED
    3.76 +    help
    3.77 +      gcc-4.4.0 and above requires CLooG/PPL to build some parts of the
    3.78 +      optimiser (the GRAPHITE loop optimisation, to be precise).
    3.79 +      
    3.80 +      This will be automatically selected if you choose gcc>=4.4.0, but you
    3.81 +      can say 'Y' here, although it is unknown yet if any other component
    3.82 +      can use it.
    3.83 +
    3.84 +config MPC
    3.85 +    bool
    3.86 +    prompt "MPC"
    3.87 +    select GMP
    3.88 +    select MPFR
    3.89 +    select PPL
    3.90 +    select CLOOG
    3.91 +    select WRAPPER_NEEDED
    3.92 +    help
    3.93 +      gcc-4.4.0 and above can also optionally use MPC to enable additional
    3.94 +      optimisations on complex numbers. Although MPC is optional,
    3.95 +      crosstool-NG requires it and uses it to build gcc >= 4.4.0.
    3.96 +      
    3.97 +      This will be automatically selected if you choose gcc>=4.4.0, but you
    3.98 +      can say 'Y' here, although it is unknown yet if any other component
    3.99 +      can use it.
   3.100 +
   3.101 +if GMP
   3.102  source config/companion_libs/gmp.in
   3.103 +endif
   3.104 +if MPFR
   3.105  source config/companion_libs/mpfr.in
   3.106  endif
   3.107 -
   3.108 -config PPL_CLOOG_MPC
   3.109 -    bool
   3.110 -    prompt "PPL, GLooG/PPL and MPC"
   3.111 -    select GMP_MPFR
   3.112 -    select WRAPPER_NEEDED
   3.113 -    help
   3.114 -      gcc-4.4.0 and above requires PPL and CLooG/PPL to build some parts
   3.115 -      of the optimiser (GRAPHITE loop optimisation, to be precise).
   3.116 -      
   3.117 -      In addition to those, gcc-4.4 also optionally uses MPC to enable
   3.118 -      additional optimisations on complex numbers. Although MPC is optional,
   3.119 -      crosstool-NG requires it and uses it to build gcc >= 4.4.0.
   3.120 -      
   3.121 -      These will be automatically selected if you choose gcc>=4.4.0, but you
   3.122 -      can say 'Y' here, although it is unknown yet if any other component
   3.123 -      can use them.
   3.124 -
   3.125 -if PPL_CLOOG_MPC
   3.126 +if PPL
   3.127  source config/companion_libs/ppl.in
   3.128 +endif
   3.129 +if CLOOG
   3.130  source config/companion_libs/cloog.in
   3.131 +endif
   3.132 +if MPC
   3.133  source config/companion_libs/mpc.in
   3.134  endif
   3.135  
   3.136 @@ -57,12 +111,12 @@
   3.137      bool
   3.138  
   3.139  comment "Companion libraries common options"
   3.140 -    depends on GMP_MPFR || PPL_CLOOG_MPC
   3.141 +    depends on GMP || MPFR || PPL || CLOOG || MPC
   3.142  
   3.143  config COMP_LIBS_CHECK
   3.144      bool
   3.145      prompt "|  Check the companion libraries builds (!!! READ HELP!!!)"
   3.146 -    depends on GMP_MPFR || PPL_CLOOG_MPC
   3.147 +    depends on GMP || MPFR || PPL || CLOOG || MPC
   3.148      default n
   3.149      help
   3.150        It is highly recommended to check the newly built companion libraries.
   3.151 @@ -81,7 +135,7 @@
   3.152  config COMP_LIBS_TARGET
   3.153      bool
   3.154      prompt "|  Build companion libraries for the target"
   3.155 -    depends on GMP_MPFR || PPL_CLOOG_MPC
   3.156 +    depends on GMP || MPFR || PPL || CLOOG || MPC
   3.157      depends on ! BARE_METAL
   3.158      default n
   3.159      help
     4.1 --- a/config/debug/gdb.in	Tue Feb 09 22:50:53 2010 +0100
     4.2 +++ b/config/debug/gdb.in	Wed Feb 17 23:47:47 2010 +0100
     4.3 @@ -58,7 +58,8 @@
     4.4      prompt "Use GMP and MPFR"
     4.5      default n
     4.6      depends on GDB_NATIVE
     4.7 -    select GMP_MPFR
     4.8 +    select GMP
     4.9 +    select MPFR
    4.10      select COMP_LIBS_TARGET
    4.11      help
    4.12        gdb can make use of the GMP and MPFR libraries.
     5.1 --- a/scripts/build/binutils/binutils.sh	Tue Feb 09 22:50:53 2010 +0100
     5.2 +++ b/scripts/build/binutils/binutils.sh	Wed Feb 17 23:47:47 2010 +0100
     5.3 @@ -26,10 +26,8 @@
     5.4  
     5.5      # If GMP and MPFR were configured, then use that,
     5.6      # otherwise let binutils find the system-wide libraries, if they exist.
     5.7 -    if [ "${CT_GMP_MPFR}" = "y" ]; then
     5.8 -        extra_config+=("--with-gmp=${CT_PREFIX_DIR}")
     5.9 -        extra_config+=("--with-mpfr=${CT_PREFIX_DIR}")
    5.10 -    fi
    5.11 +    [ -z "${CT_GMP}"    ] || extra_config+=("--with-gmp=${CT_PREFIX_DIR}")
    5.12 +    [ -z "${CT_MPFR}"   ] || extra_config+=("--with-mpfr=${CT_PREFIX_DIR}")
    5.13  
    5.14      CT_DoLog EXTRA "Configuring binutils"
    5.15      CFLAGS="${CT_CFLAGS_FOR_HOST}"                              \
    5.16 @@ -86,7 +84,7 @@
    5.17      done
    5.18  
    5.19      # If GMP and MPFR were configured, then use that
    5.20 -    if [ "${CT_BINUTILS_TARGET_USE_GMP_MPFR}" = "y" ]; then
    5.21 +    if [ "${CT_COMP_LIBS_TARGET}" = "y" ]; then
    5.22          extra_config+=("--with-gmp=${CT_SYSROOT_DIR}/usr")
    5.23          extra_config+=("--with-mpfr=${CT_SYSROOT_DIR}/usr")
    5.24      fi
     6.1 --- a/scripts/build/cc/gcc.sh	Tue Feb 09 22:50:53 2010 +0100
     6.2 +++ b/scripts/build/cc/gcc.sh	Wed Feb 17 23:47:47 2010 +0100
     6.3 @@ -150,15 +150,11 @@
     6.4      else
     6.5          extra_config+=("--disable-__cxa_atexit")
     6.6      fi
     6.7 -    if [ "${CT_GMP_MPFR}" = "y" ]; then
     6.8 -        extra_config+=("--with-gmp=${CT_PREFIX_DIR}")
     6.9 -        extra_config+=("--with-mpfr=${CT_PREFIX_DIR}")
    6.10 -    fi
    6.11 -    if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then
    6.12 -        extra_config+=("--with-ppl=${CT_PREFIX_DIR}")
    6.13 -        extra_config+=("--with-cloog=${CT_PREFIX_DIR}")
    6.14 -        extra_config+=("--with-mpc=${CT_PREFIX_DIR}")
    6.15 -    fi
    6.16 +    [ -z "${CT_GMP}"    ] || extra_config+=("--with-gmp=${CT_PREFIX_DIR}")
    6.17 +    [ -z "${CT_MPFR}"   ] || extra_config+=("--with-mpfr=${CT_PREFIX_DIR}")
    6.18 +    [ -z "${CT_PPL}"    ] || extra_config+=("--with-ppl=${CT_PREFIX_DIR}")
    6.19 +    [ -z "${CT_CLOOG}"  ] || extra_config+=("--with-cloog=${CT_PREFIX_DIR}")
    6.20 +    [ -z "${CT_MPC}"    ] || extra_config+=("--with-mpc=${CT_PREFIX_DIR}")
    6.21  
    6.22      CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
    6.23  
    6.24 @@ -300,18 +296,14 @@
    6.25      else
    6.26          extra_config+=("--disable-__cxa_atexit")
    6.27      fi
    6.28 -    if [ "${CT_GMP_MPFR}" = "y" ]; then
    6.29 -        extra_config+=("--with-gmp=${CT_PREFIX_DIR}")
    6.30 -        extra_config+=("--with-mpfr=${CT_PREFIX_DIR}")
    6.31 -    fi
    6.32 -    if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then
    6.33 -        extra_config+=("--with-ppl=${CT_PREFIX_DIR}")
    6.34 -        extra_config+=("--with-cloog=${CT_PREFIX_DIR}")
    6.35 -        extra_config+=("--with-mpc=${CT_PREFIX_DIR}")
    6.36 -    fi
    6.37      if [ -n "${CC_ENABLE_CXX_FLAGS}" ]; then
    6.38          extra_config+=("--enable-cxx-flags=${CC_ENABLE_CXX_FLAGS}")
    6.39      fi
    6.40 +    [ -z "${CT_GMP}"    ] || extra_config+=("--with-gmp=${CT_PREFIX_DIR}")
    6.41 +    [ -z "${CT_MPFR}"   ] || extra_config+=("--with-mpfr=${CT_PREFIX_DIR}")
    6.42 +    [ -z "${CT_PPL}"    ] || extra_config+=("--with-ppl=${CT_PREFIX_DIR}")
    6.43 +    [ -z "${CT_CLOOG}"  ] || extra_config+=("--with-cloog=${CT_PREFIX_DIR}")
    6.44 +    [ -z "${CT_MPC}"    ] || extra_config+=("--with-mpc=${CT_PREFIX_DIR}")
    6.45  
    6.46      CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
    6.47  
     7.1 --- a/scripts/build/companion_libs/cloog.sh	Tue Feb 09 22:50:53 2010 +0100
     7.2 +++ b/scripts/build/companion_libs/cloog.sh	Wed Feb 17 23:47:47 2010 +0100
     7.3 @@ -8,7 +8,7 @@
     7.4  do_cloog_target() { :; }
     7.5  
     7.6  # Overide functions depending on configuration
     7.7 -if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then
     7.8 +if [ "${CT_CLOOG}" = "y" ]; then
     7.9  
    7.10  # Download CLooG
    7.11  do_cloog_get() {
    7.12 @@ -78,4 +78,4 @@
    7.13      CT_EndStep
    7.14  }
    7.15  
    7.16 -fi # CT_PPL_CLOOG_MPC
    7.17 +fi # CT_CLOOG
     8.1 --- a/scripts/build/companion_libs/gmp.sh	Tue Feb 09 22:50:53 2010 +0100
     8.2 +++ b/scripts/build/companion_libs/gmp.sh	Wed Feb 17 23:47:47 2010 +0100
     8.3 @@ -8,7 +8,7 @@
     8.4  do_gmp_target() { :; }
     8.5  
     8.6  # Overide functions depending on configuration
     8.7 -if [ "${CT_GMP_MPFR}" = "y" ]; then
     8.8 +if [ "${CT_GMP}" = "y" ]; then
     8.9  
    8.10  # Download GMP
    8.11  do_gmp_get() {
    8.12 @@ -87,6 +87,6 @@
    8.13      CT_EndStep
    8.14  }
    8.15  
    8.16 -fi # CT_GMP_MPFR_TARGET == y
    8.17 +fi # CT_COMP_LIBS_TARGET == y
    8.18  
    8.19 -fi # CT_GMP_MPFR == y
    8.20 +fi # CT_GMP == y
     9.1 --- a/scripts/build/companion_libs/mpc.sh	Tue Feb 09 22:50:53 2010 +0100
     9.2 +++ b/scripts/build/companion_libs/mpc.sh	Wed Feb 17 23:47:47 2010 +0100
     9.3 @@ -8,7 +8,7 @@
     9.4  do_mpc_target() { :; }
     9.5  
     9.6  # Overide functions depending on configuration
     9.7 -if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then
     9.8 +if [ "${CT_MPC}" = "y" ]; then
     9.9  
    9.10  # Download MPC
    9.11  do_mpc_get() {
    9.12 @@ -54,4 +54,4 @@
    9.13      CT_EndStep
    9.14  }
    9.15  
    9.16 -fi # CT_PPL_CLOOG_MPC
    9.17 +fi # CT_MPC
    10.1 --- a/scripts/build/companion_libs/mpfr.sh	Tue Feb 09 22:50:53 2010 +0100
    10.2 +++ b/scripts/build/companion_libs/mpfr.sh	Wed Feb 17 23:47:47 2010 +0100
    10.3 @@ -8,7 +8,7 @@
    10.4  do_mpfr_target() { :; }
    10.5  
    10.6  # Overide function depending on configuration
    10.7 -if [ "${CT_GMP_MPFR}" = "y" ]; then
    10.8 +if [ "${CT_MPFR}" = "y" ]; then
    10.9  
   10.10  # Download MPFR
   10.11  do_mpfr_get() {
   10.12 @@ -145,6 +145,6 @@
   10.13      CT_EndStep
   10.14  }
   10.15  
   10.16 -fi # CT_GMP_MPFR_TARGET == y
   10.17 +fi # CT_COMP_LIBS_TARGET == y
   10.18  
   10.19 -fi # CT_GMP_MPFR == y
   10.20 +fi # CT_MPFR == y
    11.1 --- a/scripts/build/companion_libs/ppl.sh	Tue Feb 09 22:50:53 2010 +0100
    11.2 +++ b/scripts/build/companion_libs/ppl.sh	Wed Feb 17 23:47:47 2010 +0100
    11.3 @@ -8,7 +8,7 @@
    11.4  do_ppl_target() { :; }
    11.5  
    11.6  # Overide functions depending on configuration
    11.7 -if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then
    11.8 +if [ "${CT_PPL}" = "y" ]; then
    11.9  
   11.10  # Download PPL
   11.11  do_ppl_get() {
   11.12 @@ -68,4 +68,4 @@
   11.13      CT_EndStep
   11.14  }
   11.15  
   11.16 -fi # CT_PPL_CLOOG_MPC
   11.17 +fi # CT_PPL
    12.1 --- a/scripts/build/debug/300-gdb.sh	Tue Feb 09 22:50:53 2010 +0100
    12.2 +++ b/scripts/build/debug/300-gdb.sh	Wed Feb 17 23:47:47 2010 +0100
    12.3 @@ -99,9 +99,8 @@
    12.4          cd "${CT_BUILD_DIR}/build-gdb-cross"
    12.5  
    12.6          cross_extra_config=("${extra_config[@]}")
    12.7 -        if [ "${CT_GMP_MPFR}" = "y" ]; then
    12.8 -            cross_extra_config+=("--with-gmp=${CT_PREFIX_DIR}" "--with-mpfr=${CT_PREFIX_DIR}")
    12.9 -        fi
   12.10 +        [ -z "${CT_GMP}"    ] || cross_extra_config+=("--with-gmp=${CT_PREFIX_DIR}")
   12.11 +        [ -z "${CT_MPFR}"   ] || cross_extra_config+=("--with-mpfr=${CT_PREFIX_DIR}")
   12.12          case "${CT_THREADS}" in
   12.13              none)   cross_extra_config+=("--disable-threads");;
   12.14              *)      cross_extra_config+=("--enable-threads");;
    13.1 --- a/scripts/showSamples.sh	Tue Feb 09 22:50:53 2010 +0100
    13.2 +++ b/scripts/showSamples.sh	Wed Feb 17 23:47:47 2010 +0100
    13.3 @@ -16,6 +16,7 @@
    13.4  # Dump a single sample
    13.5  dump_single_sample() {
    13.6      local verbose=0
    13.7 +    local complibs
    13.8      [ "$1" = "-v" ] && verbose=1 && shift
    13.9      [ "$1" = "-w" ] && wiki=1 && shift
   13.10      local width="$1"
   13.11 @@ -38,7 +39,7 @@
   13.12              ;;
   13.13      esac
   13.14      if [ -z "${wiki}" ]; then
   13.15 -        t_width=13
   13.16 +        t_width=14
   13.17          printf "%-*s  [%s" ${width} "${sample}" "${sample_type}"
   13.18          [ -f "${sample_top}/samples/${sample}/broken" ] && printf "B" || printf " "
   13.19          [ "${CT_EXPERIMENTAL}" = "y" ] && printf "X" || printf " "
   13.20 @@ -51,12 +52,18 @@
   13.21                      ;;
   13.22              esac
   13.23              printf "    %-*s : %s\n" ${t_width} "OS" "${CT_KERNEL}${CT_KERNEL_VERSION:+-}${CT_KERNEL_VERSION}"
   13.24 -            if [ "${CT_GMP_MPFR}" = "y" ]; then
   13.25 -                printf    "    %-*s : %s\n" ${t_width} "GMP/MPFR" "gmp-${CT_GMP_VERSION} / mpfr-${CT_MPFR_VERSION}"
   13.26 +            if [    -n "${CT_GMP}" -o -n "${CT_MPFR}"                       \
   13.27 +                 -o -n "${CT_PPL}" -o -n "${CT_CLOOG}" -o -n "${CT_MPC}"    \
   13.28 +               ]; then
   13.29 +                printf "    %-*s :" ${t_width} "Companion libs"
   13.30 +                complibs=1
   13.31              fi
   13.32 -            if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then
   13.33 -                printf    "    %-*s : %s\n" ${t_width} "PPL/CLOOG/MPC" "ppl-${CT_PPL_VERSION} / cloog-${CT_CLOOG_VERSION} / mpc-${CT_MPC_VERSION}"
   13.34 -            fi
   13.35 +            [ -z "${CT_GMP}"    ] || printf " gmp-%s"       "${CT_GMP_VERSION}"
   13.36 +            [ -z "${CT_MPFR}"   ] || printf " mpfr-%s"      "${CT_MPFR_VERSION}"
   13.37 +            [ -z "${CT_PPL}"    ] || printf " ppl-%s"       "${CT_PPL_VERSION}"
   13.38 +            [ -z "${CT_CLOOG}"  ] || printf " cloog-ppl-%s" "${CT_CLOOG_VERSION}"
   13.39 +            [ -z "${CT_MPC}"    ] || printf " mpc-%s"       "${CT_MPC_VERSION}"
   13.40 +            [ -z "${complibs}"  ] || printf "\n"
   13.41              printf  "    %-*s : %s\n" ${t_width} "binutils" "binutils-${CT_BINUTILS_VERSION}"
   13.42              printf  "    %-*s : %s" ${t_width} "C compiler" "${CT_CC}-${CT_CC_VERSION} (C"
   13.43              [ "${CT_CC_LANG_CXX}" = "y"     ] && printf ",C++"