# HG changeset patch # User "Yann E. MORIN" # Date 1309190690 -7200 # Node ID b1bf9ca6db1ab23895d7c9c5a8535e4ded43e0fc # Parent ff2481a6e60f19b8d8fc32b3c5284c9fd3d8650b cc/gcc: add MIPS spercific configure options Add the following MIPS specific options when configuring gcc: --with(out)-llsc --with(out)-synci --with(out)-mips-plt --with-divide=type Signed-off-by: "Yann E. MORIN" diff -r ff2481a6e60f -r b1bf9ca6db1a config/cc/gcc.in.2 --- a/config/cc/gcc.in.2 Mon Jun 27 15:15:00 2011 +0200 +++ b/config/cc/gcc.in.2 Mon Jun 27 18:04:50 2011 +0200 @@ -249,3 +249,15 @@ default "sysv" if CC_GCC_LNK_HASH_STYLE_SYSV default "gnu" if CC_GCC_LNK_HASH_STYLE_GNU default "both" if CC_GCC_LNK_HASH_STYLE_BOTH + +#----------------------------------------------------------------------------- + +config CC_GCC_HAS_ARCH_OPTIONS + bool + +comment "archictecture-specific options" + depends on CC_GCC_HAS_ARCH_OPTIONS + +if ARCH_mips +source "config/cc/gcc.in.mips" +endif # ARCH_mips diff -r ff2481a6e60f -r b1bf9ca6db1a config/cc/gcc.in.mips --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/cc/gcc.in.mips Mon Jun 27 18:04:50 2011 +0200 @@ -0,0 +1,34 @@ +# MIPS specific options for gcc + +config CC_GCC_HAS_ARCH_OPTIONS + default y + +config CC_GCC_mips_llsc + tristate + prompt "Use llsc" + default m + help + This configures how gcc will emit load-link, store-conditional and + sync opcodes. Normally, you'd set this to 'M', and configure will do + the correct thing (ie. enable llsc for Linux-based targets, disable + for others). If you know better, you can force either using llsc or + not using it (resp. 'Y' or 'N'). + +config CC_GCC_mips_synci + tristate + prompt "Use synci" + default m + help + This configures how gcc will emit the synci opcode. Normally, you'd + set this to 'M', and configure will do the correct thing (ie. disable). + If you know better, you can force using synci (say 'Y'), or not using + it (say 'N'). + +config CC_GCC_mips_plt + bool + prompt "Use copy relocations & PLTs" + help + This configures gcc to use copy relocations & PLTs. These are + extensions to the traditional SVR4-based MIPS ABIs and require + support from GNU binutils and the runtime C library. + Say 'N' to keep the default and not use them, say 'Y' to use them. diff -r ff2481a6e60f -r b1bf9ca6db1a scripts/build/cc/gcc.sh --- a/scripts/build/cc/gcc.sh Mon Jun 27 15:15:00 2011 +0200 +++ b/scripts/build/cc/gcc.sh Mon Jun 27 18:04:50 2011 +0200 @@ -267,6 +267,22 @@ *) 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 + 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) @@ -544,6 +560,22 @@ *) 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