# HG changeset patch # User "Yann E. MORIN" # Date 1213028063 0 # Node ID a7782f2c09268a128118cf5c7a1f32499d5c177e # Parent 6b15ef33e8f2dd14e83273cf63414f47e466a27b 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(-) diff -r 6b15ef33e8f2 -r a7782f2c0926 config/cc/gcc.in --- a/config/cc/gcc.in Sun Jun 01 21:12:00 2008 +0000 +++ b/config/cc/gcc.in Mon Jun 09 16:14:23 2008 +0000 @@ -104,6 +104,10 @@ # CT_INSERT_VERSION_STRING_ABOVE # Don't remove above line! +config CC_GCC_4_3_or_later + bool + default n + config CC_CXA_ATEXIT bool prompt "__cxa_atexit" @@ -129,6 +133,26 @@ help Extra flags to pass onto ./configure when configuring gcc. +config CC_PKGVERSION + string + prompt "gcc ID string" + depends on CC_GCC_4_3_or_later + default "crosstool-NG-${CT_VERSION}" + help + Specify a string that identifies your package. You may wish to include + a build number or build date. This version string will be included in + the output of gcc --version. + + This is passed to the configure flag --with-pkgversion. + +config CC_BUGURL + string + prompt "gcc bug URL" + depends on CC_GCC_4_3_or_later + default "" + help + Specify the URL that users should visit if they wish to report a bug. + menuconfig CC_GCC_GMP_MPFR bool prompt "GMP and MPFR" diff -r 6b15ef33e8f2 -r a7782f2c0926 scripts/build/cc_gcc.sh --- a/scripts/build/cc_gcc.sh Sun Jun 01 21:12:00 2008 +0000 +++ b/scripts/build/cc_gcc.sh Mon Jun 09 16:14:23 2008 +0000 @@ -223,8 +223,10 @@ extra_config="--enable-languages=${lang_opt}" extra_config="${extra_config} --disable-multilib" 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}" - [ "${CT_SHARED_LIBS}" = "y" ] || extra_config="${extra_config} --disable-shared" + [ "${CT_SHARED_LIBS}" = "y" ] || extra_config="${extra_config} --disable-shared" [ "${CT_CC_GCC_GMP_MPFR}" = "y" ] && extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}" + [ -n "${CT_CC_PKGVERSION}" ] && extra_config="${extra_config} --with-pkgversion=${CT_CC_PKGVERSION}" + [ -n "${CT_CC_BUGURL}" ] && extra_config="${extra_config} --with-bugurl=${CT_CC_BUGURL}" if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then extra_config="${extra_config} --enable-__cxa_atexit" else diff -r 6b15ef33e8f2 -r a7782f2c0926 tools/addToolVersion.sh --- a/tools/addToolVersion.sh Sun Jun 01 21:12:00 2008 +0000 +++ b/tools/addToolVersion.sh Mon Jun 09 16:14:23 2008 +0000 @@ -80,7 +80,12 @@ esac for ver in ${VERSION}; do - unset DEP L1 L2 L3 L4 L5 FILE + # Split VERSION into MAJOR MINOR PATCHLEVEL EXTRAVERSION + VERSION_M=$(echo "${VERSION}...." |cut -d . -f 1) + VERSION_m=$(echo "${VERSION}...." |cut -d . -f 2) + VERSION_P=$(echo "${VERSION}...." |cut -d . -f 3) + VERSION_E=$(echo "${VERSION}...." |cut -d . -f 4) + unset DEP L1 L2 L3 L4 L5 L6 FILE v=$(echo "${ver}" |sed -r -e 's/-/_/g; s/\./_/g;') if [ "${cat}" = "KERNEL" ]; then TOOL_SUFFIX=$(echo "${tool_suffix}" |tr [[:lower:]] [[:upper:]]) @@ -98,7 +103,14 @@ L1="config ${cat}_V_${v}\n" L2=" bool\n" L3=" prompt \"${ver}${prompt_suffix}\"\n" - L5=" default \"${ver}\" if ${cat}_V_${v}" + L6=" default \"${ver}\" if ${cat}_V_${v}" + case "${tool}" in + gcc) + if [ ${VERSION_M} -gt 4 -o \( ${VERSION_M} -eq 4 -a ${VERSION_m} -gret 3 i\) ]; then + L5=" select CC_GCC_4_3_or_later" + fi + ;; + esac FILE="config/${tool_prefix}/${tool}.in" fi [ -n "${EXP}" ] && DEP="${DEP} && EXPERIMENTAL" @@ -107,6 +119,6 @@ "") ;; *) L4=" depends on "$(echo "${DEP}" |sed -r -e 's/^ \\&\\& //; s/\\&/\\\\&/g;')"\n" esac - sed -r -i -e 's/^(# CT_INSERT_VERSION_ABOVE)$/'"${L1}${L2}${L3}${L4}"'\n\1/; - s/^(# CT_INSERT_VERSION_STRING_ABOVE)$/'"${L5}"'\n\1/;' "${FILE}" + sed -r -i -e 's/^(# CT_INSERT_VERSION_ABOVE)$/'"${L1}${L2}${L3}${L4}${L5}"'\n\1/; + s/^(# CT_INSERT_VERSION_STRING_ABOVE)$/'"${L6}"'\n\1/;' "${FILE}" done