cc/gcc: handle NLS option
authorZhenqiang Chen <zhenqiang.chen@linaro.org>
Thu Nov 17 18:00:28 2011 +0800 (2011-11-17)
changeset 278003ab39f149b4
parent 2779 fc8b56c5c483
child 2781 504b0759c149
cc/gcc: handle NLS option

Add --disable-nls config when option "Enable nls" is not selected.

Reviewed-by: Michael Hope
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
scripts/build/cc/gcc.sh
     1.1 --- a/scripts/build/cc/gcc.sh	Thu Nov 17 17:59:44 2011 +0800
     1.2 +++ b/scripts/build/cc/gcc.sh	Thu Nov 17 18:00:28 2011 +0800
     1.3 @@ -289,6 +289,8 @@
     1.4      extra_config+=(--disable-libgomp)
     1.5      extra_config+=(--disable-libmudflap)
     1.6  
     1.7 +    [ "${CT_TOOLCHAIN_ENABLE_NLS}" != "y" ] && extra_config+=("--disable-nls")
     1.8 +
     1.9      CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
    1.10  
    1.11      # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532)
    1.12 @@ -306,7 +308,6 @@
    1.13          --disable-libmudflap                        \
    1.14          ${CC_CORE_SYSROOT_ARG}                      \
    1.15          "${extra_config[@]}"                        \
    1.16 -        --disable-nls                               \
    1.17          --enable-languages="${lang_opt}"            \
    1.18          "${CT_CC_CORE_EXTRA_CONFIG_ARRAY[@]}"
    1.19  
    1.20 @@ -598,10 +599,10 @@
    1.21              ;; # ARCH is mips
    1.22      esac
    1.23  
    1.24 +    [ "${CT_TOOLCHAIN_ENABLE_NLS}" != "y" ] && extra_config+=("--disable-nls")
    1.25 +
    1.26      CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
    1.27  
    1.28 -    # --disable-nls to work around crash bug on ppc405, but also because
    1.29 -    # embedded systems don't really need message catalogs...
    1.30      CT_DoExecLog CFG                                \
    1.31      CC_FOR_BUILD="${CT_BUILD}-gcc"                  \
    1.32      CFLAGS="${CT_CFLAGS_FOR_HOST}"                  \
    1.33 @@ -617,7 +618,6 @@
    1.34          ${CC_SYSROOT_ARG}                           \
    1.35          "${extra_config[@]}"                        \
    1.36          --with-local-prefix="${CT_SYSROOT_DIR}"     \
    1.37 -        --disable-nls                               \
    1.38          --enable-c99                                \
    1.39          --enable-long-long                          \
    1.40          "${CT_CC_EXTRA_CONFIG_ARRAY[@]}"