diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2011-07-03 20:32:36 (GMT) |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2011-07-03 20:32:36 (GMT) |
commit | 69f9485343efe9d5f1eeb046297384b0ea9b7fc9 (patch) | |
tree | 52ca88a8d3d9c1097242873a4be8ad4ecf1f79c8 /scripts/build | |
parent | 9bc3edf13b1d48926ff9592b9b18d6e2fcf00988 (diff) |
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" <yann.morin.1998@anciens.enib.fr>
Diffstat (limited to 'scripts/build')
-rw-r--r-- | scripts/build/cc/gcc.sh | 64 |
1 files changed, 34 insertions, 30 deletions
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 |