summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-06-09 16:14:23 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-06-09 16:14:23 (GMT)
commit929c368541c44dddd5f51d889635077a3cf55dab (patch)
treef1239f0f20ff656aa09fe71b7129db2cf6d045f4
parent9d8b0a6829a654a414244ca77923faf40cf1e74f (diff)
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(-)
-rw-r--r--config/cc/gcc.in24
-rw-r--r--scripts/build/cc_gcc.sh4
-rwxr-xr-xtools/addToolVersion.sh20
3 files changed, 43 insertions, 5 deletions
diff --git a/config/cc/gcc.in b/config/cc/gcc.in
index 84d0abf..9d60d18 100644
--- a/config/cc/gcc.in
+++ b/config/cc/gcc.in
@@ -104,6 +104,10 @@ config CC_VERSION
# 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 @@ config CC_EXTRA_CONFIG
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 --git a/scripts/build/cc_gcc.sh b/scripts/build/cc_gcc.sh
index 5a6b148..87e8ef2 100644
--- a/scripts/build/cc_gcc.sh
+++ b/scripts/build/cc_gcc.sh
@@ -223,8 +223,10 @@ do_cc() {
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 --git a/tools/addToolVersion.sh b/tools/addToolVersion.sh
index 37e6940..e158575 100755
--- a/tools/addToolVersion.sh
+++ b/tools/addToolVersion.sh
@@ -80,7 +80,12 @@ case "${cat}" in
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 @@ for ver in ${VERSION}; do
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 @@ for ver in ${VERSION}; do
"") ;;
*) 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