diff options
author | Marcin Juszkiewicz <hrw@openedhand.com> | 2007-12-19 12:01:17 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openedhand.com> | 2007-12-19 12:01:17 +0000 |
commit | 994be9eaf4ff1c4911451ccdea9346f2a4d345af (patch) | |
tree | 32e99ff59c5887790015d00d2a6caefab1c62478 /meta/conf/machine | |
parent | 2f039d93e367e94e7c1f4d729dcd93abf6a3b9d2 (diff) | |
download | openembedded-core-994be9eaf4ff1c4911451ccdea9346f2a4d345af.tar.gz openembedded-core-994be9eaf4ff1c4911451ccdea9346f2a4d345af.tar.bz2 openembedded-core-994be9eaf4ff1c4911451ccdea9346f2a4d345af.tar.xz openembedded-core-994be9eaf4ff1c4911451ccdea9346f2a4d345af.zip |
tune-thumb: switch ARM/Thumb instruction set (from OE)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3356 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/conf/machine')
-rw-r--r-- | meta/conf/machine/include/tune-thumb.inc | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/conf/machine/include/tune-thumb.inc b/meta/conf/machine/include/tune-thumb.inc new file mode 100644 index 000000000..a25cb5320 --- /dev/null +++ b/meta/conf/machine/include/tune-thumb.inc @@ -0,0 +1,32 @@ +#tune file for thumb instructions + +ARM_INSTRUCTION_SET ?= "arm" +# "arm" "thumb" +# The instruction set the compiler should use when generating application +# code. The kernel is always compiled with arm code at present. arm code +# is the original 32 bit ARM instruction set, thumb code is the 16 bit +# encoded RISC sub-set. Thumb code is smaller (maybe 70% of the ARM size) +# but requires more instructions (140% for 70% smaller code) so may be +# slower. + +THUMB_INTERWORK ?= "yes" +# "yes" "no" +# Whether to compile with code to allow interworking between the two +# instruction sets. This allows thumb code to be executed on a primarily +# arm system and vice versa. It is strongly recommended that DISTROs not +# turn this off - the actual cost is very small. + +OVERRIDE_THUMB = "${@['', ':thumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" +OVERRIDE_INTERWORK = "${@['', ':thumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" +OVERRIDES .= "${OVERRIDE_THUMB}${OVERRIDE_INTERWORK}" + +# Compiler and linker options for application code and kernel code. These +# options ensure that the compiler has the correct settings for the selected +# instruction set and interworking. +ARM_INTERWORK_M_OPT = "${@['-mno-thumb-interwork', '-mthumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" +ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" + +# +TARGET_CC_ARCH += "${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}" +TARGET_CC_KERNEL_ARCH += "-mno-thumb-interwork -mno-thumb" + |