1.1 --- a/config/cc/gcc.in.2 Mon Jun 27 15:15:00 2011 +0200
1.2 +++ b/config/cc/gcc.in.2 Mon Jun 27 18:04:50 2011 +0200
1.3 @@ -249,3 +249,15 @@
1.4 default "sysv" if CC_GCC_LNK_HASH_STYLE_SYSV
1.5 default "gnu" if CC_GCC_LNK_HASH_STYLE_GNU
1.6 default "both" if CC_GCC_LNK_HASH_STYLE_BOTH
1.7 +
1.8 +#-----------------------------------------------------------------------------
1.9 +
1.10 +config CC_GCC_HAS_ARCH_OPTIONS
1.11 + bool
1.12 +
1.13 +comment "archictecture-specific options"
1.14 + depends on CC_GCC_HAS_ARCH_OPTIONS
1.15 +
1.16 +if ARCH_mips
1.17 +source "config/cc/gcc.in.mips"
1.18 +endif # ARCH_mips
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/config/cc/gcc.in.mips Mon Jun 27 18:04:50 2011 +0200
2.3 @@ -0,0 +1,34 @@
2.4 +# MIPS specific options for gcc
2.5 +
2.6 +config CC_GCC_HAS_ARCH_OPTIONS
2.7 + default y
2.8 +
2.9 +config CC_GCC_mips_llsc
2.10 + tristate
2.11 + prompt "Use llsc"
2.12 + default m
2.13 + help
2.14 + This configures how gcc will emit load-link, store-conditional and
2.15 + sync opcodes. Normally, you'd set this to 'M', and configure will do
2.16 + the correct thing (ie. enable llsc for Linux-based targets, disable
2.17 + for others). If you know better, you can force either using llsc or
2.18 + not using it (resp. 'Y' or 'N').
2.19 +
2.20 +config CC_GCC_mips_synci
2.21 + tristate
2.22 + prompt "Use synci"
2.23 + default m
2.24 + help
2.25 + This configures how gcc will emit the synci opcode. Normally, you'd
2.26 + set this to 'M', and configure will do the correct thing (ie. disable).
2.27 + If you know better, you can force using synci (say 'Y'), or not using
2.28 + it (say 'N').
2.29 +
2.30 +config CC_GCC_mips_plt
2.31 + bool
2.32 + prompt "Use copy relocations & PLTs"
2.33 + help
2.34 + This configures gcc to use copy relocations & PLTs. These are
2.35 + extensions to the traditional SVR4-based MIPS ABIs and require
2.36 + support from GNU binutils and the runtime C library.
2.37 + Say 'N' to keep the default and not use them, say 'Y' to use them.
3.1 --- a/scripts/build/cc/gcc.sh Mon Jun 27 15:15:00 2011 +0200
3.2 +++ b/scripts/build/cc/gcc.sh Mon Jun 27 18:04:50 2011 +0200
3.3 @@ -267,6 +267,22 @@
3.4 *) extra_config+=( "--with-linker-hash-style=${CT_CC_GCC_LNK_HASH_STYLE}" );;
3.5 esac
3.6
3.7 + case "${CT_CC_GCC_mips_llsc}" in
3.8 + y) extra_config+=( --with-llsc );;
3.9 + m) ;;
3.10 + *) extra_config+=( --without-llsc );;
3.11 + esac
3.12 +
3.13 + case "${CT_CC_GCC_mips_synci}" in
3.14 + y) extra_config+=( --with-synci );;
3.15 + m) ;;
3.16 + *) extra_config+=( --without-synci );;
3.17 + esac
3.18 +
3.19 + if [ "${CT_CC_GCC_mips_plt}" ]; then
3.20 + extra_config+=( --with-mips-plt )
3.21 + fi
3.22 +
3.23 CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
3.24
3.25 # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532)
3.26 @@ -544,6 +560,22 @@
3.27 *) extra_config+=( "--with-linker-hash-style=${CT_CC_GCC_LNK_HASH_STYLE}" );;
3.28 esac
3.29
3.30 + case "${CT_CC_GCC_mips_llsc}" in
3.31 + y) extra_config+=( --with-llsc );;
3.32 + m) ;;
3.33 + *) extra_config+=( --without-llsc );;
3.34 + esac
3.35 +
3.36 + case "${CT_CC_GCC_mips_synci}" in
3.37 + y) extra_config+=( --with-synci );;
3.38 + m) ;;
3.39 + *) extra_config+=( --without-synci );;
3.40 + esac
3.41 +
3.42 + if [ "${CT_CC_GCC_mips_plt}" ]; then
3.43 + extra_config+=( --with-mips-plt )
3.44 + fi
3.45 +
3.46 if [ "${CT_CC_GCC_ENABLE_PLUGINS}" = "y" ]; then
3.47 extra_config+=( --enable-plugin )
3.48 fi