From 69f9485343efe9d5f1eeb046297384b0ea9b7fc9 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 3 Jul 2011 22:32:36 +0200 Subject: cc/gcc: fix non-MIPS builds The new MIPS-specific options are not valid for other targets. Also, move the arch-specific setting lower in the extra_config setting. Signed-off-by: "Yann E. MORIN" diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index ffd1c67..6a606ab 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -267,22 +267,24 @@ do_cc_core() { *) extra_config+=( "--with-linker-hash-style=${CT_CC_GCC_LNK_HASH_STYLE}" );; esac - case "${CT_CC_GCC_mips_llsc}" in - y) extra_config+=( --with-llsc );; - m) ;; - *) extra_config+=( --without-llsc );; - esac - - case "${CT_CC_GCC_mips_synci}" in - y) extra_config+=( --with-synci );; - m) ;; - *) extra_config+=( --without-synci );; + case "${CT_ARCH}" in + mips) + case "${CT_CC_GCC_mips_llsc}" in + y) extra_config+=( --with-llsc );; + m) ;; + *) extra_config+=( --without-llsc );; + esac + case "${CT_CC_GCC_mips_synci}" in + y) extra_config+=( --with-synci );; + m) ;; + *) extra_config+=( --without-synci );; + esac + if [ "${CT_CC_GCC_mips_plt}" ]; then + extra_config+=( --with-mips-plt ) + fi + ;; # ARCH is mips esac - if [ "${CT_CC_GCC_mips_plt}" ]; then - extra_config+=( --with-mips-plt ) - fi - CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'" # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532) @@ -560,22 +562,6 @@ do_cc() { *) extra_config+=( "--with-linker-hash-style=${CT_CC_GCC_LNK_HASH_STYLE}" );; esac - case "${CT_CC_GCC_mips_llsc}" in - y) extra_config+=( --with-llsc );; - m) ;; - *) extra_config+=( --without-llsc );; - esac - - case "${CT_CC_GCC_mips_synci}" in - y) extra_config+=( --with-synci );; - m) ;; - *) extra_config+=( --without-synci );; - esac - - if [ "${CT_CC_GCC_mips_plt}" ]; then - extra_config+=( --with-mips-plt ) - fi - if [ "${CT_CC_GCC_ENABLE_PLUGINS}" = "y" ]; then extra_config+=( --enable-plugin ) fi @@ -583,6 +569,24 @@ do_cc() { extra_config+=( --enable-gold ) fi + case "${CT_ARCH}" in + mips) + case "${CT_CC_GCC_mips_llsc}" in + y) extra_config+=( --with-llsc );; + m) ;; + *) extra_config+=( --without-llsc );; + esac + case "${CT_CC_GCC_mips_synci}" in + y) extra_config+=( --with-synci );; + m) ;; + *) extra_config+=( --without-synci );; + esac + if [ "${CT_CC_GCC_mips_plt}" ]; then + extra_config+=( --with-mips-plt ) + fi + ;; # ARCH is mips + esac + CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'" # --disable-nls to work around crash bug on ppc405, but also because -- cgit v0.10.2-6-g49f6