arch/arm: add THUMB interworking support
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Oct 26 23:11:10 2009 +0100 (2009-10-26)
changeset 1597fa8f3ab724f9
parent 1596 ca1bf632da51
child 1598 5fcd88c72e5a
arch/arm: add THUMB interworking support

Add config option to build wtarget code with THUMB interworking.
This is used to build the C library as well as all other code
that runs on the target.
config/arch/arm.in
scripts/build/arch/arm.sh
     1.1 --- a/config/arch/arm.in	Mon Oct 26 09:10:38 2009 +0100
     1.2 +++ b/config/arch/arm.in	Mon Oct 26 23:11:10 2009 +0100
     1.3 @@ -38,6 +38,20 @@
     1.4  
     1.5  endchoice
     1.6  
     1.7 +config ARCH_ARM_INTERWORKING
     1.8 +    bool
     1.9 +    prompt "Use Thumb-interworking (READ HELP)"
    1.10 +    default n
    1.11 +    depends on EXPERIMENTAL
    1.12 +    help
    1.13 +      Excerpt from the gcc manual:
    1.14 +      
    1.15 +      > Generate code which supports calling between the ARM and Thumb
    1.16 +      > instruction sets. Without this option the two instruction sets
    1.17 +      > cannot be reliably used inside one program. The default is
    1.18 +      > [not to use interwork], since slightly larger code is generated
    1.19 +      > when [interwork] is specified.
    1.20 +
    1.21  config ARCH_ARM_EABI
    1.22      bool
    1.23      prompt "Use EABI"
     2.1 --- a/scripts/build/arch/arm.sh	Mon Oct 26 09:10:38 2009 +0100
     2.2 +++ b/scripts/build/arch/arm.sh	Mon Oct 26 23:11:10 2009 +0100
     2.3 @@ -20,4 +20,8 @@
     2.4  #            CT_ARCH_TARGET_CFLAGS="-mthumb"
     2.5              ;;
     2.6      esac
     2.7 +
     2.8 +    if [ "${CT_ARCH_ARM_INTERWORKING}" = "y" ]; then
     2.9 +        CT_ARCH_TARGET_CFLAGS+=" -mthumb-interwork"
    2.10 +    fi
    2.11  }