cc/gcc: do not consume parameters when parsing them
author"Yann E. MORIN" <yann.morin.1998@free.fr>
Mon Feb 13 21:51:48 2012 +0100 (2012-02-13)
changeset 288491017ae2151c
parent 2883 cea814c9932a
child 2885 17c162b426c6
cc/gcc: do not consume parameters when parsing them

The current construct consumes the parameters while we parse them.
Change this to a construct that does not consume the parameters.

This has no impact on gcc, but is done for homogeneity with other
components (eg. glibc).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/build/cc/gcc.sh
     1.1 --- a/scripts/build/cc/gcc.sh	Mon Feb 13 21:47:25 2012 +0100
     1.2 +++ b/scripts/build/cc/gcc.sh	Mon Feb 13 21:51:48 2012 +0100
     1.3 @@ -122,10 +122,10 @@
     1.4      local -a extra_config
     1.5      local -a core_LDFLAGS
     1.6      local -a core_targets
     1.7 +    local arg
     1.8  
     1.9 -    while [ $# -ne 0 ]; do
    1.10 -        eval "${1// /\\ }"
    1.11 -        shift
    1.12 +    for arg in "$@"; do
    1.13 +        eval "${arg// /\\ }"
    1.14      done
    1.15  
    1.16      lang_opt=c