Add support for the up-coming gcc-4.3.
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Jun 09 16:14:23 2008 +0000 (2008-06-09)
changeset 545a7782f2c0926
parent 544 6b15ef33e8f2
child 546 0bf5637e0afd
Add support for the up-coming gcc-4.3.
Two new config options: pkgversion and bugurl.

/trunk/scripts/build/cc_gcc.sh | 4 3 1 0 +++-
/trunk/tools/addToolVersion.sh | 20 16 4 0 ++++++++++++++++----
/trunk/config/cc/gcc.in | 24 24 0 0 ++++++++++++++++++++++++
3 files changed, 43 insertions(+), 5 deletions(-)
config/cc/gcc.in
scripts/build/cc_gcc.sh
tools/addToolVersion.sh
     1.1 --- a/config/cc/gcc.in	Sun Jun 01 21:12:00 2008 +0000
     1.2 +++ b/config/cc/gcc.in	Mon Jun 09 16:14:23 2008 +0000
     1.3 @@ -104,6 +104,10 @@
     1.4  # CT_INSERT_VERSION_STRING_ABOVE
     1.5  # Don't remove above line!
     1.6  
     1.7 +config CC_GCC_4_3_or_later
     1.8 +    bool
     1.9 +    default n
    1.10 +
    1.11  config CC_CXA_ATEXIT
    1.12      bool
    1.13      prompt "__cxa_atexit"
    1.14 @@ -129,6 +133,26 @@
    1.15      help
    1.16        Extra flags to pass onto ./configure when configuring gcc.
    1.17  
    1.18 +config CC_PKGVERSION
    1.19 +    string
    1.20 +    prompt "gcc ID string"
    1.21 +    depends on CC_GCC_4_3_or_later
    1.22 +    default "crosstool-NG-${CT_VERSION}"
    1.23 +    help
    1.24 +      Specify a string that identifies your package. You may wish to include
    1.25 +      a build number or build date. This version string will be included in
    1.26 +      the output of gcc --version.
    1.27 +
    1.28 +      This is passed to the configure flag --with-pkgversion.
    1.29 +
    1.30 +config CC_BUGURL
    1.31 +    string
    1.32 +    prompt "gcc bug URL"
    1.33 +    depends on CC_GCC_4_3_or_later
    1.34 +    default ""
    1.35 +    help
    1.36 +      Specify the URL that users should visit if they wish to report a bug.
    1.37 +
    1.38  menuconfig CC_GCC_GMP_MPFR
    1.39      bool
    1.40      prompt "GMP and MPFR"
     2.1 --- a/scripts/build/cc_gcc.sh	Sun Jun 01 21:12:00 2008 +0000
     2.2 +++ b/scripts/build/cc_gcc.sh	Mon Jun 09 16:14:23 2008 +0000
     2.3 @@ -223,8 +223,10 @@
     2.4      extra_config="--enable-languages=${lang_opt}"
     2.5      extra_config="${extra_config} --disable-multilib"
     2.6      extra_config="${extra_config} ${CT_ARCH_WITH_ARCH} ${CT_ARCH_WITH_ABI} ${CT_ARCH_WITH_CPU} ${CT_ARCH_WITH_TUNE} ${CT_ARCH_WITH_FPU} ${CT_ARCH_WITH_FLOAT}"
     2.7 -    [ "${CT_SHARED_LIBS}" = "y" ] || extra_config="${extra_config} --disable-shared"
     2.8 +    [ "${CT_SHARED_LIBS}" = "y" ]     || extra_config="${extra_config} --disable-shared"
     2.9      [ "${CT_CC_GCC_GMP_MPFR}" = "y" ] && extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}"
    2.10 +    [ -n "${CT_CC_PKGVERSION}" ]      && extra_config="${extra_config} --with-pkgversion=${CT_CC_PKGVERSION}"
    2.11 +    [ -n "${CT_CC_BUGURL}" ]          && extra_config="${extra_config} --with-bugurl=${CT_CC_BUGURL}"
    2.12      if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then
    2.13          extra_config="${extra_config} --enable-__cxa_atexit"
    2.14      else
     3.1 --- a/tools/addToolVersion.sh	Sun Jun 01 21:12:00 2008 +0000
     3.2 +++ b/tools/addToolVersion.sh	Mon Jun 09 16:14:23 2008 +0000
     3.3 @@ -80,7 +80,12 @@
     3.4  esac
     3.5  
     3.6  for ver in ${VERSION}; do
     3.7 -    unset DEP L1 L2 L3 L4 L5 FILE
     3.8 +    # Split VERSION into MAJOR MINOR PATCHLEVEL EXTRAVERSION 
     3.9 +    VERSION_M=$(echo "${VERSION}...." |cut -d . -f 1)
    3.10 +    VERSION_m=$(echo "${VERSION}...." |cut -d . -f 2)
    3.11 +    VERSION_P=$(echo "${VERSION}...." |cut -d . -f 3)
    3.12 +    VERSION_E=$(echo "${VERSION}...." |cut -d . -f 4)
    3.13 +    unset DEP L1 L2 L3 L4 L5 L6 FILE
    3.14      v=$(echo "${ver}" |sed -r -e 's/-/_/g; s/\./_/g;')
    3.15      if [ "${cat}" = "KERNEL" ]; then
    3.16          TOOL_SUFFIX=$(echo "${tool_suffix}" |tr [[:lower:]] [[:upper:]])
    3.17 @@ -98,7 +103,14 @@
    3.18          L1="config ${cat}_V_${v}\n"
    3.19          L2="    bool\n"
    3.20          L3="    prompt \"${ver}${prompt_suffix}\"\n"
    3.21 -        L5="    default \"${ver}\" if ${cat}_V_${v}"
    3.22 +        L6="    default \"${ver}\" if ${cat}_V_${v}"
    3.23 +        case "${tool}" in
    3.24 +            gcc)
    3.25 +                if [ ${VERSION_M} -gt 4 -o \( ${VERSION_M} -eq 4 -a ${VERSION_m} -gret 3 i\) ]; then
    3.26 +                    L5="    select CC_GCC_4_3_or_later"
    3.27 +                fi
    3.28 +                ;;
    3.29 +        esac
    3.30          FILE="config/${tool_prefix}/${tool}.in"
    3.31      fi
    3.32      [ -n "${EXP}" ] && DEP="${DEP} && EXPERIMENTAL"
    3.33 @@ -107,6 +119,6 @@
    3.34          "") ;;
    3.35          *)  L4="    depends on "$(echo "${DEP}" |sed -r -e 's/^ \\&\\& //; s/\\&/\\\\&/g;')"\n"
    3.36      esac
    3.37 -    sed -r -i -e 's/^(# CT_INSERT_VERSION_ABOVE)$/'"${L1}${L2}${L3}${L4}"'\n\1/;
    3.38 -                  s/^(# CT_INSERT_VERSION_STRING_ABOVE)$/'"${L5}"'\n\1/;' "${FILE}"
    3.39 +    sed -r -i -e 's/^(# CT_INSERT_VERSION_ABOVE)$/'"${L1}${L2}${L3}${L4}${L5}"'\n\1/;
    3.40 +                  s/^(# CT_INSERT_VERSION_STRING_ABOVE)$/'"${L6}"'\n\1/;' "${FILE}"
    3.41  done