complibs: split-up selection for individual libs

This commit is contained in:
Yann E. MORIN" 2010-02-17 23:47:47 +01:00
parent c6689215d1
commit 3eaa187de5
13 changed files with 127 additions and 72 deletions

View File

@ -79,7 +79,8 @@ config BINUTILS_TARGET_USE_GMP_MPFR
bool bool
prompt "Use GMP and MPFR" prompt "Use GMP and MPFR"
default n default n
select GMP_MPFR select GMP
select MPFR
select COMP_LIBS_TARGET select COMP_LIBS_TARGET
help help
binutils can be configured to use GMP and MPFR. binutils can be configured to use GMP and MPFR.

View File

@ -102,13 +102,16 @@ endchoice
config CC_GCC_4_3_or_later config CC_GCC_4_3_or_later
bool bool
default n default n
select GMP_MPFR select GMP
select MPFR
config CC_GCC_4_4_or_later config CC_GCC_4_4_or_later
bool bool
default n default n
select CC_GCC_4_3_or_later select CC_GCC_4_3_or_later
select PPL_CLOOG_MPC select PPL
select CLOOG
select MPC
config CC_VERSION config CC_VERSION
string string

View File

@ -4,20 +4,22 @@
menu "Companion libraries" menu "Companion libraries"
comment "FIXME: check real dependencies!!!"
config WRAPPER_NEEDED config WRAPPER_NEEDED
bool bool
default n default n
config GMP_MPFR config GMP
bool bool
prompt "GMP and MPFR" prompt "GMP"
select WRAPPER_NEEDED select WRAPPER_NEEDED
help help
gcc 4.3.0 and above requires both GMP and MPFR to build some frontends, gcc 4.3.0 and above requires GMP to build some frontends, and some
and some other components can use them as well. other components can use them as well.
These will be automatically selected if you choose gcc>=4.3.0, but you This will be automatically selected if you choose gcc>=4.3.0, but you
can say 'Y' here if you want to build those two libraries for the other can say 'Y' here if you want to build this library for the other
components (that don't select them by default). components (that don't select them by default).
The packages that can use GMP and MPFR are: The packages that can use GMP and MPFR are:
@ -25,31 +27,83 @@ config GMP_MPFR
- gcc - gcc
- gdb - gdb
if GMP_MPFR config MPFR
source config/companion_libs/gmp.in
source config/companion_libs/mpfr.in
endif
config PPL_CLOOG_MPC
bool bool
prompt "PPL, GLooG/PPL and MPC" prompt "MPFR"
select GMP_MPFR select GMP
select WRAPPER_NEEDED select WRAPPER_NEEDED
help help
gcc-4.4.0 and above requires PPL and CLooG/PPL to build some parts gcc 4.3.0 and above requires MPFR to build some frontends, and some
of the optimiser (GRAPHITE loop optimisation, to be precise). other components can use them as well.
In addition to those, gcc-4.4 also optionally uses MPC to enable This will be automatically selected if you choose gcc>=4.3.0, but you
additional optimisations on complex numbers. Although MPC is optional, can say 'Y' here if you want to build this library for the other
components (that don't select them by default).
The packages that can use GMP and MPFR are:
- binutils
- gcc
- gdb
config PPL
bool
prompt "PPL"
select GMP
select MPFR
select WRAPPER_NEEDED
help
gcc-4.4.0 and above requires PPL to build some parts of the optimiser
(the GRAPHITE loop optimisation, to be precise).
This will be automatically selected if you choose gcc>=4.4.0, but you
can say 'Y' here, although it is unknown yet if any other component
can use it.
config CLOOG
bool
prompt "GLooG/PPL"
select GMP
select MPFR
select PPL
select WRAPPER_NEEDED
help
gcc-4.4.0 and above requires CLooG/PPL to build some parts of the
optimiser (the GRAPHITE loop optimisation, to be precise).
This will be automatically selected if you choose gcc>=4.4.0, but you
can say 'Y' here, although it is unknown yet if any other component
can use it.
config MPC
bool
prompt "MPC"
select GMP
select MPFR
select PPL
select CLOOG
select WRAPPER_NEEDED
help
gcc-4.4.0 and above can also optionally use MPC to enable additional
optimisations on complex numbers. Although MPC is optional,
crosstool-NG requires it and uses it to build gcc >= 4.4.0. crosstool-NG requires it and uses it to build gcc >= 4.4.0.
These will be automatically selected if you choose gcc>=4.4.0, but you This will be automatically selected if you choose gcc>=4.4.0, but you
can say 'Y' here, although it is unknown yet if any other component can say 'Y' here, although it is unknown yet if any other component
can use them. can use it.
if PPL_CLOOG_MPC if GMP
source config/companion_libs/gmp.in
endif
if MPFR
source config/companion_libs/mpfr.in
endif
if PPL
source config/companion_libs/ppl.in source config/companion_libs/ppl.in
endif
if CLOOG
source config/companion_libs/cloog.in source config/companion_libs/cloog.in
endif
if MPC
source config/companion_libs/mpc.in source config/companion_libs/mpc.in
endif endif
@ -57,12 +111,12 @@ config FOO
bool bool
comment "Companion libraries common options" comment "Companion libraries common options"
depends on GMP_MPFR || PPL_CLOOG_MPC depends on GMP || MPFR || PPL || CLOOG || MPC
config COMP_LIBS_CHECK config COMP_LIBS_CHECK
bool bool
prompt "| Check the companion libraries builds (!!! READ HELP!!!)" prompt "| Check the companion libraries builds (!!! READ HELP!!!)"
depends on GMP_MPFR || PPL_CLOOG_MPC depends on GMP || MPFR || PPL || CLOOG || MPC
default n default n
help help
It is highly recommended to check the newly built companion libraries. It is highly recommended to check the newly built companion libraries.
@ -81,7 +135,7 @@ config COMP_LIBS_CHECK
config COMP_LIBS_TARGET config COMP_LIBS_TARGET
bool bool
prompt "| Build companion libraries for the target" prompt "| Build companion libraries for the target"
depends on GMP_MPFR || PPL_CLOOG_MPC depends on GMP || MPFR || PPL || CLOOG || MPC
depends on ! BARE_METAL depends on ! BARE_METAL
default n default n
help help

View File

@ -58,7 +58,8 @@ config GDB_NATIVE_USE_GMP_MPFR
prompt "Use GMP and MPFR" prompt "Use GMP and MPFR"
default n default n
depends on GDB_NATIVE depends on GDB_NATIVE
select GMP_MPFR select GMP
select MPFR
select COMP_LIBS_TARGET select COMP_LIBS_TARGET
help help
gdb can make use of the GMP and MPFR libraries. gdb can make use of the GMP and MPFR libraries.

View File

@ -26,10 +26,8 @@ do_binutils() {
# If GMP and MPFR were configured, then use that, # If GMP and MPFR were configured, then use that,
# otherwise let binutils find the system-wide libraries, if they exist. # otherwise let binutils find the system-wide libraries, if they exist.
if [ "${CT_GMP_MPFR}" = "y" ]; then [ -z "${CT_GMP}" ] || extra_config+=("--with-gmp=${CT_PREFIX_DIR}")
extra_config+=("--with-gmp=${CT_PREFIX_DIR}") [ -z "${CT_MPFR}" ] || extra_config+=("--with-mpfr=${CT_PREFIX_DIR}")
extra_config+=("--with-mpfr=${CT_PREFIX_DIR}")
fi
CT_DoLog EXTRA "Configuring binutils" CT_DoLog EXTRA "Configuring binutils"
CFLAGS="${CT_CFLAGS_FOR_HOST}" \ CFLAGS="${CT_CFLAGS_FOR_HOST}" \
@ -86,7 +84,7 @@ do_binutils_target() {
done done
# If GMP and MPFR were configured, then use that # If GMP and MPFR were configured, then use that
if [ "${CT_BINUTILS_TARGET_USE_GMP_MPFR}" = "y" ]; then if [ "${CT_COMP_LIBS_TARGET}" = "y" ]; then
extra_config+=("--with-gmp=${CT_SYSROOT_DIR}/usr") extra_config+=("--with-gmp=${CT_SYSROOT_DIR}/usr")
extra_config+=("--with-mpfr=${CT_SYSROOT_DIR}/usr") extra_config+=("--with-mpfr=${CT_SYSROOT_DIR}/usr")
fi fi

View File

@ -150,15 +150,11 @@ do_cc_core() {
else else
extra_config+=("--disable-__cxa_atexit") extra_config+=("--disable-__cxa_atexit")
fi fi
if [ "${CT_GMP_MPFR}" = "y" ]; then [ -z "${CT_GMP}" ] || extra_config+=("--with-gmp=${CT_PREFIX_DIR}")
extra_config+=("--with-gmp=${CT_PREFIX_DIR}") [ -z "${CT_MPFR}" ] || extra_config+=("--with-mpfr=${CT_PREFIX_DIR}")
extra_config+=("--with-mpfr=${CT_PREFIX_DIR}") [ -z "${CT_PPL}" ] || extra_config+=("--with-ppl=${CT_PREFIX_DIR}")
fi [ -z "${CT_CLOOG}" ] || extra_config+=("--with-cloog=${CT_PREFIX_DIR}")
if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then [ -z "${CT_MPC}" ] || extra_config+=("--with-mpc=${CT_PREFIX_DIR}")
extra_config+=("--with-ppl=${CT_PREFIX_DIR}")
extra_config+=("--with-cloog=${CT_PREFIX_DIR}")
extra_config+=("--with-mpc=${CT_PREFIX_DIR}")
fi
CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'" CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
@ -300,18 +296,14 @@ do_cc() {
else else
extra_config+=("--disable-__cxa_atexit") extra_config+=("--disable-__cxa_atexit")
fi fi
if [ "${CT_GMP_MPFR}" = "y" ]; then
extra_config+=("--with-gmp=${CT_PREFIX_DIR}")
extra_config+=("--with-mpfr=${CT_PREFIX_DIR}")
fi
if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then
extra_config+=("--with-ppl=${CT_PREFIX_DIR}")
extra_config+=("--with-cloog=${CT_PREFIX_DIR}")
extra_config+=("--with-mpc=${CT_PREFIX_DIR}")
fi
if [ -n "${CC_ENABLE_CXX_FLAGS}" ]; then if [ -n "${CC_ENABLE_CXX_FLAGS}" ]; then
extra_config+=("--enable-cxx-flags=${CC_ENABLE_CXX_FLAGS}") extra_config+=("--enable-cxx-flags=${CC_ENABLE_CXX_FLAGS}")
fi fi
[ -z "${CT_GMP}" ] || extra_config+=("--with-gmp=${CT_PREFIX_DIR}")
[ -z "${CT_MPFR}" ] || extra_config+=("--with-mpfr=${CT_PREFIX_DIR}")
[ -z "${CT_PPL}" ] || extra_config+=("--with-ppl=${CT_PREFIX_DIR}")
[ -z "${CT_CLOOG}" ] || extra_config+=("--with-cloog=${CT_PREFIX_DIR}")
[ -z "${CT_MPC}" ] || extra_config+=("--with-mpc=${CT_PREFIX_DIR}")
CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'" CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"

View File

@ -8,7 +8,7 @@ do_cloog() { :; }
do_cloog_target() { :; } do_cloog_target() { :; }
# Overide functions depending on configuration # Overide functions depending on configuration
if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then if [ "${CT_CLOOG}" = "y" ]; then
# Download CLooG # Download CLooG
do_cloog_get() { do_cloog_get() {
@ -78,4 +78,4 @@ do_cloog() {
CT_EndStep CT_EndStep
} }
fi # CT_PPL_CLOOG_MPC fi # CT_CLOOG

View File

@ -8,7 +8,7 @@ do_gmp() { :; }
do_gmp_target() { :; } do_gmp_target() { :; }
# Overide functions depending on configuration # Overide functions depending on configuration
if [ "${CT_GMP_MPFR}" = "y" ]; then if [ "${CT_GMP}" = "y" ]; then
# Download GMP # Download GMP
do_gmp_get() { do_gmp_get() {
@ -87,6 +87,6 @@ do_gmp_target() {
CT_EndStep CT_EndStep
} }
fi # CT_GMP_MPFR_TARGET == y fi # CT_COMP_LIBS_TARGET == y
fi # CT_GMP_MPFR == y fi # CT_GMP == y

View File

@ -8,7 +8,7 @@ do_mpc() { :; }
do_mpc_target() { :; } do_mpc_target() { :; }
# Overide functions depending on configuration # Overide functions depending on configuration
if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then if [ "${CT_MPC}" = "y" ]; then
# Download MPC # Download MPC
do_mpc_get() { do_mpc_get() {
@ -54,4 +54,4 @@ do_mpc() {
CT_EndStep CT_EndStep
} }
fi # CT_PPL_CLOOG_MPC fi # CT_MPC

View File

@ -8,7 +8,7 @@ do_mpfr() { :; }
do_mpfr_target() { :; } do_mpfr_target() { :; }
# Overide function depending on configuration # Overide function depending on configuration
if [ "${CT_GMP_MPFR}" = "y" ]; then if [ "${CT_MPFR}" = "y" ]; then
# Download MPFR # Download MPFR
do_mpfr_get() { do_mpfr_get() {
@ -145,6 +145,6 @@ do_mpfr_target() {
CT_EndStep CT_EndStep
} }
fi # CT_GMP_MPFR_TARGET == y fi # CT_COMP_LIBS_TARGET == y
fi # CT_GMP_MPFR == y fi # CT_MPFR == y

View File

@ -8,7 +8,7 @@ do_ppl() { :; }
do_ppl_target() { :; } do_ppl_target() { :; }
# Overide functions depending on configuration # Overide functions depending on configuration
if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then if [ "${CT_PPL}" = "y" ]; then
# Download PPL # Download PPL
do_ppl_get() { do_ppl_get() {
@ -68,4 +68,4 @@ do_ppl() {
CT_EndStep CT_EndStep
} }
fi # CT_PPL_CLOOG_MPC fi # CT_PPL

View File

@ -99,9 +99,8 @@ do_debug_gdb_build() {
cd "${CT_BUILD_DIR}/build-gdb-cross" cd "${CT_BUILD_DIR}/build-gdb-cross"
cross_extra_config=("${extra_config[@]}") cross_extra_config=("${extra_config[@]}")
if [ "${CT_GMP_MPFR}" = "y" ]; then [ -z "${CT_GMP}" ] || cross_extra_config+=("--with-gmp=${CT_PREFIX_DIR}")
cross_extra_config+=("--with-gmp=${CT_PREFIX_DIR}" "--with-mpfr=${CT_PREFIX_DIR}") [ -z "${CT_MPFR}" ] || cross_extra_config+=("--with-mpfr=${CT_PREFIX_DIR}")
fi
case "${CT_THREADS}" in case "${CT_THREADS}" in
none) cross_extra_config+=("--disable-threads");; none) cross_extra_config+=("--disable-threads");;
*) cross_extra_config+=("--enable-threads");; *) cross_extra_config+=("--enable-threads");;

View File

@ -16,6 +16,7 @@ export GREP_OPTIONS=
# Dump a single sample # Dump a single sample
dump_single_sample() { dump_single_sample() {
local verbose=0 local verbose=0
local complibs
[ "$1" = "-v" ] && verbose=1 && shift [ "$1" = "-v" ] && verbose=1 && shift
[ "$1" = "-w" ] && wiki=1 && shift [ "$1" = "-w" ] && wiki=1 && shift
local width="$1" local width="$1"
@ -38,7 +39,7 @@ dump_single_sample() {
;; ;;
esac esac
if [ -z "${wiki}" ]; then if [ -z "${wiki}" ]; then
t_width=13 t_width=14
printf "%-*s [%s" ${width} "${sample}" "${sample_type}" printf "%-*s [%s" ${width} "${sample}" "${sample_type}"
[ -f "${sample_top}/samples/${sample}/broken" ] && printf "B" || printf " " [ -f "${sample_top}/samples/${sample}/broken" ] && printf "B" || printf " "
[ "${CT_EXPERIMENTAL}" = "y" ] && printf "X" || printf " " [ "${CT_EXPERIMENTAL}" = "y" ] && printf "X" || printf " "
@ -51,12 +52,18 @@ dump_single_sample() {
;; ;;
esac esac
printf " %-*s : %s\n" ${t_width} "OS" "${CT_KERNEL}${CT_KERNEL_VERSION:+-}${CT_KERNEL_VERSION}" printf " %-*s : %s\n" ${t_width} "OS" "${CT_KERNEL}${CT_KERNEL_VERSION:+-}${CT_KERNEL_VERSION}"
if [ "${CT_GMP_MPFR}" = "y" ]; then if [ -n "${CT_GMP}" -o -n "${CT_MPFR}" \
printf " %-*s : %s\n" ${t_width} "GMP/MPFR" "gmp-${CT_GMP_VERSION} / mpfr-${CT_MPFR_VERSION}" -o -n "${CT_PPL}" -o -n "${CT_CLOOG}" -o -n "${CT_MPC}" \
fi ]; then
if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then printf " %-*s :" ${t_width} "Companion libs"
printf " %-*s : %s\n" ${t_width} "PPL/CLOOG/MPC" "ppl-${CT_PPL_VERSION} / cloog-${CT_CLOOG_VERSION} / mpc-${CT_MPC_VERSION}" complibs=1
fi fi
[ -z "${CT_GMP}" ] || printf " gmp-%s" "${CT_GMP_VERSION}"
[ -z "${CT_MPFR}" ] || printf " mpfr-%s" "${CT_MPFR_VERSION}"
[ -z "${CT_PPL}" ] || printf " ppl-%s" "${CT_PPL_VERSION}"
[ -z "${CT_CLOOG}" ] || printf " cloog-ppl-%s" "${CT_CLOOG_VERSION}"
[ -z "${CT_MPC}" ] || printf " mpc-%s" "${CT_MPC_VERSION}"
[ -z "${complibs}" ] || printf "\n"
printf " %-*s : %s\n" ${t_width} "binutils" "binutils-${CT_BINUTILS_VERSION}" printf " %-*s : %s\n" ${t_width} "binutils" "binutils-${CT_BINUTILS_VERSION}"
printf " %-*s : %s" ${t_width} "C compiler" "${CT_CC}-${CT_CC_VERSION} (C" printf " %-*s : %s" ${t_width} "C compiler" "${CT_CC}-${CT_CC_VERSION} (C"
[ "${CT_CC_LANG_CXX}" = "y" ] && printf ",C++" [ "${CT_CC_LANG_CXX}" = "y" ] && printf ",C++"