gcc: promote PKGVERSION and BUGURL options to toolchain level
author"Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
Tue May 31 20:12:35 2011 +0200 (2011-05-31)
changeset 2487481cd34691f0
parent 2486 328816f6e606
child 2488 58a28561f1bc
gcc: promote PKGVERSION and BUGURL options to toolchain level

This patch promotes the PKGVERSION and BUGURL options to toolchain level so that
all toolchain components supporting them can benefit from them.

These options are passed to configure through --with-pkgversion and
--with-bugurl.

They are supported by binutils 2.18+, gcc 4.3+, eglibc 2.9+ and gdb 7.0+.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
config/cc/gcc.in.2
config/toolchain.in
scripts/build/cc/gcc.sh
     1.1 --- a/config/cc/gcc.in.2	Tue May 31 19:55:59 2011 +0200
     1.2 +++ b/config/cc/gcc.in.2	Tue May 31 20:12:35 2011 +0200
     1.3 @@ -1,25 +1,5 @@
     1.4  # gcc configuration options
     1.5  
     1.6 -config CC_PKGVERSION
     1.7 -    string
     1.8 -    prompt "gcc ID string"
     1.9 -    depends on CC_GCC_HAS_PKGVERSION_BUGURL
    1.10 -    default "crosstool-NG-${CT_VERSION}"
    1.11 -    help
    1.12 -      Specify a string that identifies your package. You may wish to include
    1.13 -      a build number or build date. This version string will be included in
    1.14 -      the output of gcc --version.
    1.15 -
    1.16 -      This is passed to the configure flag --with-pkgversion.
    1.17 -
    1.18 -config CC_BUGURL
    1.19 -    string
    1.20 -    prompt "gcc bug URL"
    1.21 -    depends on CC_GCC_HAS_PKGVERSION_BUGURL
    1.22 -    default ""
    1.23 -    help
    1.24 -      Specify the URL that users should visit if they wish to report a bug.
    1.25 -
    1.26  config CC_ENABLE_CXX_FLAGS
    1.27      string
    1.28      prompt "Flags to pass to --enable-cxx-flags"
     2.1 --- a/config/toolchain.in	Tue May 31 19:55:59 2011 +0200
     2.2 +++ b/config/toolchain.in	Tue May 31 20:12:35 2011 +0200
     2.3 @@ -66,6 +66,24 @@
     2.4        NOTE: this has no connection to whether the target libraries will be
     2.5        dynamic or static. This only applies to the tools themselves.
     2.6  
     2.7 +config TOOLCHAIN_PKGVERSION
     2.8 +    string
     2.9 +    prompt "Toolchain ID string"
    2.10 +    default "crosstool-NG-${CT_VERSION}"
    2.11 +    help
    2.12 +      Specify a string that identifies your package. You may wish to include
    2.13 +      a build number or build date. This version string will be included in
    2.14 +      the output of gcc --version.
    2.15 +
    2.16 +      This is passed to the configure flag --with-pkgversion.
    2.17 +
    2.18 +config TOOLCHAIN_BUGURL
    2.19 +    string
    2.20 +    prompt "Toolchain bug URL"
    2.21 +    default ""
    2.22 +    help
    2.23 +      Specify the URL that users should visit if they wish to report a bug.
    2.24 +
    2.25  comment "Tuple completion and aliasing"
    2.26  
    2.27  config TARGET_VENDOR
     3.1 --- a/scripts/build/cc/gcc.sh	Tue May 31 19:55:59 2011 +0200
     3.2 +++ b/scripts/build/cc/gcc.sh	Tue May 31 20:12:35 2011 +0200
     3.3 @@ -159,9 +159,11 @@
     3.4      mkdir -p "${CT_BUILD_DIR}/build-cc-core-${mode}"
     3.5      cd "${CT_BUILD_DIR}/build-cc-core-${mode}"
     3.6  
     3.7 -    # Bare metal delivers the core compiler as final compiler, so add version info and bugurl
     3.8 -    [ -n "${CT_CC_BUGURL}" ]     && extra_config+=("--with-bugurl=${CT_CC_BUGURL}")
     3.9 -    [ -n "${CT_CC_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_CC_PKGVERSION}")
    3.10 +    if [ "${CT_CC_GCC_HAS_PKGVERSION_BUGURL}" = "y" ]; then
    3.11 +        # Bare metal delivers the core compiler as final compiler, so add version info and bugurl
    3.12 +        [ -n "${CT_TOOLCHAIN_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_TOOLCHAIN_PKGVERSION}")
    3.13 +        [ -n "${CT_TOOLCHAIN_BUGURL}" ]     && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
    3.14 +    fi
    3.15  
    3.16      if [ "${copy_headers}" = "y" ]; then
    3.17          CT_DoLog DEBUG "Copying headers to install area of bootstrap gcc, so it can build libgcc2"
    3.18 @@ -401,9 +403,11 @@
    3.19          fi
    3.20      done
    3.21  
    3.22 -    [ "${CT_SHARED_LIBS}" = "y" ]                   || extra_config+=("--disable-shared")
    3.23 -    [ -n "${CT_CC_PKGVERSION}" ]                    && extra_config+=("--with-pkgversion=${CT_CC_PKGVERSION}")
    3.24 -    [ -n "${CT_CC_BUGURL}" ]                        && extra_config+=("--with-bugurl=${CT_CC_BUGURL}")
    3.25 +    [ "${CT_SHARED_LIBS}" = "y" ] || extra_config+=("--disable-shared")
    3.26 +    if [ "${CT_CC_GCC_HAS_PKGVERSION_BUGURL}" = "y" ]; then
    3.27 +        [ -n "${CT_TOOLCHAIN_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_TOOLCHAIN_PKGVERSION}")
    3.28 +        [ -n "${CT_TOOLCHAIN_BUGURL}" ]     && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
    3.29 +    fi
    3.30      case "${CT_CC_GCC_SJLJ_EXCEPTIONS}" in
    3.31          y)  extra_config+=("--enable-sjlj-exceptions");;
    3.32          m)  ;;