config: rename variables that are arrays
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed May 18 23:00:46 2011 +0200 (2011-05-18)
changeset 2467200836977ce6
parent 2466 b7df125a1c78
child 2468 90595d1c1017
config: rename variables that are arrays

Make it explicit that a variable is an array bu the name of the variable.
It will be used later when .config gets munged to allow both multiple
arguments and arguments with spaces at the same time to be passed from the
configuration down to the build scripts.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
config/arch/powerpc.in.2
config/binutils/binutils.in
config/binutils/elf2flt.in
config/cc/gcc.in.2
config/libc/glibc-eglibc.in-common
scripts/build/binutils/binutils.sh
scripts/build/binutils/elf2flt.sh
scripts/build/cc/gcc.sh
scripts/build/libc/glibc-eglibc.sh-common
scripts/crosstool-NG.sh.in
     1.1 --- a/config/arch/powerpc.in.2	Sun May 15 18:51:40 2011 +0200
     1.2 +++ b/config/arch/powerpc.in.2	Wed May 18 23:00:46 2011 +0200
     1.3 @@ -11,7 +11,7 @@
     1.4        
     1.5        Setting this option will append "spe" to the end of your target
     1.6        tuple name (e.g., powerpc-e500v2-linux-gnuspe) so that the gcc
     1.7 -      configure/build system will know to include SPE ABI support.
     1.8 -      It will also automatically add "-mabi=spe -mspe" to your
     1.9 -      TARGET_CFLAGS, and "--enable-e500_double" to your CC_EXTRA_CONFIG,
    1.10 -      so you do not need to explicitly add them.
    1.11 +      configure/build system will know to include SPE ABI support. It
    1.12 +      will also automatically add "-mabi=spe -mspe" to your TARGET_CFLAGS,
    1.13 +      and "--enable-e500_double" to your CC_EXTRA_CONFIG_ARRAY, so you
    1.14 +      do not need to explicitly add them.
     2.1 --- a/config/binutils/binutils.in	Sun May 15 18:51:40 2011 +0200
     2.2 +++ b/config/binutils/binutils.in	Wed May 18 23:00:46 2011 +0200
     2.3 @@ -195,7 +195,7 @@
     2.4        Especially, gold can use the lto-plugin, as installed
     2.5        by gcc, to handle LTO.
     2.6  
     2.7 -config BINUTILS_EXTRA_CONFIG
     2.8 +config BINUTILS_EXTRA_CONFIG_ARRAY
     2.9      string
    2.10      prompt "binutils extra config"
    2.11      default ""
     3.1 --- a/config/binutils/elf2flt.in	Sun May 15 18:51:40 2011 +0200
     3.2 +++ b/config/binutils/elf2flt.in	Wed May 18 23:00:46 2011 +0200
     3.3 @@ -37,7 +37,7 @@
     3.4  # Don't remove next line
     3.5  # CT_INSERT_VERSION_STRING_BELOW
     3.6  
     3.7 -config ELF2FLT_EXTRA_CONFIG
     3.8 +config ELF2FLT_EXTRA_CONFIG_ARRAY
     3.9      string
    3.10      prompt "elf2flt extra config"
    3.11      default ""
     4.1 --- a/config/cc/gcc.in.2	Sun May 15 18:51:40 2011 +0200
     4.2 +++ b/config/cc/gcc.in.2	Wed May 18 23:00:46 2011 +0200
     4.3 @@ -31,7 +31,7 @@
     4.4        Note: just pass in the option _value_, that is only the part that goes
     4.5        after the '=' sign.
     4.6  
     4.7 -config CC_CORE_EXTRA_CONFIG
     4.8 +config CC_CORE_EXTRA_CONFIG_ARRAY
     4.9      string
    4.10      prompt "Core gcc extra config"
    4.11      default ""
    4.12 @@ -41,7 +41,7 @@
    4.13        The core gcc is a stripped down, C-only compiler needed to build
    4.14        the C library. Kinda bootstrap gcc, if you wish.
    4.15  
    4.16 -config CC_EXTRA_CONFIG
    4.17 +config CC_EXTRA_CONFIG_ARRAY
    4.18      string
    4.19      prompt "gcc extra config"
    4.20      default ""
     5.1 --- a/config/libc/glibc-eglibc.in-common	Sun May 15 18:51:40 2011 +0200
     5.2 +++ b/config/libc/glibc-eglibc.in-common	Wed May 18 23:00:46 2011 +0200
     5.3 @@ -16,7 +16,7 @@
     5.4      default y
     5.5      select BINUTILS_FORCE_LD_BFD
     5.6  
     5.7 -config LIBC_GLIBC_EXTRA_CONFIG
     5.8 +config LIBC_GLIBC_EXTRA_CONFIG_ARRAY
     5.9      string
    5.10      prompt "extra config"
    5.11      default ""
     6.1 --- a/scripts/build/binutils/binutils.sh	Sun May 15 18:51:40 2011 +0200
     6.2 +++ b/scripts/build/binutils/binutils.sh	Wed May 18 23:00:46 2011 +0200
     6.3 @@ -71,7 +71,7 @@
     6.4          "${extra_config[@]}"                                    \
     6.5          ${CT_ARCH_WITH_FLOAT}                                   \
     6.6          ${BINUTILS_SYSROOT_ARG}                                 \
     6.7 -        "${CT_BINUTILS_EXTRA_CONFIG[@]}"
     6.8 +        "${CT_BINUTILS_EXTRA_CONFIG_ARRAY[@]}"
     6.9  
    6.10      if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then
    6.11          extra_make_flags+=("LDFLAGS=-all-static")
     7.1 --- a/scripts/build/binutils/elf2flt.sh	Sun May 15 18:51:40 2011 +0200
     7.2 +++ b/scripts/build/binutils/elf2flt.sh	Wed May 18 23:00:46 2011 +0200
     7.3 @@ -49,7 +49,7 @@
     7.4          --with-libbfd=${binutils_bld}/bfd/libbfd.a              \
     7.5          --with-libiberty=${binutils_bld}/libiberty/libiberty.a  \
     7.6          ${elf2flt_opts}                                         \
     7.7 -        "${CT_ELF2FLT_EXTRA_CONFIG[@]}"
     7.8 +        "${CT_ELF2FLT_EXTRA_CONFIG_ARRAY[@]}"
     7.9  
    7.10      CT_DoLog EXTRA "Building elf2flt"
    7.11      CT_DoExecLog ALL make ${JOBSFLAGS}
     8.1 --- a/scripts/build/cc/gcc.sh	Sun May 15 18:51:40 2011 +0200
     8.2 +++ b/scripts/build/cc/gcc.sh	Wed May 18 23:00:46 2011 +0200
     8.3 @@ -276,7 +276,7 @@
     8.4          --disable-nls                               \
     8.5          --enable-symvers=gnu                        \
     8.6          --enable-languages="${lang_opt}"            \
     8.7 -        "${CT_CC_CORE_EXTRA_CONFIG[@]}"
     8.8 +        "${CT_CC_CORE_EXTRA_CONFIG_ARRAY[@]}"
     8.9  
    8.10      if [ "${build_libgcc}" = "yes" ]; then
    8.11          # HACK: we need to override SHLIB_LC from gcc/config/t-slibgcc-elf-ver or
    8.12 @@ -555,7 +555,7 @@
    8.13          --enable-symvers=gnu                        \
    8.14          --enable-c99                                \
    8.15          --enable-long-long                          \
    8.16 -        "${CT_CC_EXTRA_CONFIG[@]}"
    8.17 +        "${CT_CC_EXTRA_CONFIG_ARRAY[@]}"
    8.18  
    8.19      if [ "${CT_CANADIAN}" = "y" ]; then
    8.20          CT_DoLog EXTRA "Building libiberty"
     9.1 --- a/scripts/build/libc/glibc-eglibc.sh-common	Sun May 15 18:51:40 2011 +0200
     9.2 +++ b/scripts/build/libc/glibc-eglibc.sh-common	Wed May 18 23:00:46 2011 +0200
     9.3 @@ -151,7 +151,8 @@
     9.4  
     9.5      # Add some default glibc config options if not given by user.
     9.6      # We don't need to be conditional on wether the user did set different
     9.7 -    # values, as they CT_LIBC_GLIBC_EXTRA_CONFIG is passed after extra_config
     9.8 +    # values, as they CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY is passed after
     9.9 +    # extra_config
    9.10  
    9.11      extra_config+=("$(do_libc_min_kernel_config)")
    9.12  
    9.13 @@ -159,7 +160,7 @@
    9.14          nptl)           extra_config+=("--with-__thread" "--with-tls");;
    9.15          linuxthreads)   extra_config+=("--with-__thread" "--without-tls" "--without-nptl");;
    9.16          none)           extra_config+=("--without-__thread" "--without-nptl")
    9.17 -                        case "${CT_LIBC_GLIBC_EXTRA_CONFIG[*]}" in
    9.18 +                        case "${CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY[*]}" in
    9.19                              *-tls*) ;;
    9.20                              *) extra_config+=("--without-tls");;
    9.21                          esac
    9.22 @@ -228,7 +229,7 @@
    9.23  
    9.24      # Configure with --prefix the way we want it on the target...
    9.25      # There are a whole lot of settings here.  You'll probably want
    9.26 -    # to read up on what they all mean, and customize a bit, possibly by setting GLIBC_EXTRA_CONFIG
    9.27 +    # to read up on what they all mean, and customize a bit, possibly by setting GLIBC_EXTRA_CONFIG_ARRAY
    9.28      # Compare these options with the ones used when installing the glibc headers above - they're different.
    9.29      # Adding "--without-gd" option to avoid error "memusagestat.c:36:16: gd.h: No such file or directory"
    9.30      # See also http://sources.redhat.com/ml/libc-alpha/2000-07/msg00024.html.
    9.31 @@ -250,7 +251,7 @@
    9.32          --without-gd                                                \
    9.33          --with-headers="${CT_HEADERS_DIR}"                          \
    9.34          "${extra_config[@]}"                                        \
    9.35 -        "${CT_LIBC_GLIBC_EXTRA_CONFIG[@]}"
    9.36 +        "${CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY[@]}"
    9.37      
    9.38      # build hacks
    9.39      case "${CT_ARCH},${CT_ARCH_CPU}" in
    9.40 @@ -300,7 +301,7 @@
    9.41  do_libc_min_kernel_config() {
    9.42      local min_kernel_config
    9.43  
    9.44 -    case "${CT_LIBC_GLIBC_EXTRA_CONFIG[*]}" in
    9.45 +    case "${CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY[*]}" in
    9.46          *--enable-kernel*) ;;
    9.47          *)  if [ "${CT_LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS}" = "y" ]; then
    9.48                  # We can't rely on the kernel version from the configuration,
    10.1 --- a/scripts/crosstool-NG.sh.in	Sun May 15 18:51:40 2011 +0200
    10.2 +++ b/scripts/crosstool-NG.sh.in	Wed May 18 23:00:46 2011 +0200
    10.3 @@ -148,8 +148,8 @@
    10.4  # Put user-supplied flags at the end, so that they take precedence.
    10.5  CT_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_TARGET_CFLAGS}"
    10.6  CT_TARGET_LDFLAGS="${CT_ARCH_TARGET_LDFLAGS} ${CT_TARGET_LDFLAGS}"
    10.7 -CT_CC_CORE_EXTRA_CONFIG="${CT_ARCH_CC_CORE_EXTRA_CONFIG} ${CT_CC_CORE_EXTRA_CONFIG}"
    10.8 -CT_CC_EXTRA_CONFIG="${CT_ARCH_CC_EXTRA_CONFIG} ${CT_CC_EXTRA_CONFIG}"
    10.9 +CT_CC_CORE_EXTRA_CONFIG_ARRAY=( ${CT_ARCH_CC_CORE_EXTRA_CONFIG} "${CT_CC_CORE_EXTRA_CONFIG_ARRAY[@]}" )
   10.10 +CT_CC_EXTRA_CONFIG_ARRAY=( ${CT_ARCH_CC_EXTRA_CONFIG} "${CT_CC_EXTRA_CONFIG_ARRAY[@]}" )
   10.11  
   10.12  # Compute the working directories names
   10.13  CT_TARBALLS_DIR="${CT_WORK_DIR}/tarballs"