diff options
author | Khem Raj <raj.khem@gmail.com> | 2010-07-19 01:09:01 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2010-07-19 15:31:45 -0700 |
commit | e9fe87a13cf4e0453ff601c422ecbe6a98bc8f76 (patch) | |
tree | cb18d8871092eca48a40da491ed8d24f496ccb98 /conf/distro/include | |
parent | 9a3b6034297b47c56bc9dd7c4dfc888121d35a98 (diff) |
distro: Move thumb into distro features
* Currenlty we define the thumb specific overrides in machine tune files
and as machine conf files are included before the distro conf files
the overrides dont get right values and set incorrectly.
* This patch moves the tune-thumb.inc from machine/include into
distro/include and lets distro decide on thumb and thumb-interworking
features based on the machine selected. If a machine which does not
support thumb like all armv4 based machines is selected then distro
makes correct decision now to disable thumb and thumb-interworking
based upon the machine seletected.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'conf/distro/include')
-rw-r--r-- | conf/distro/include/arm-thumb.inc | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/conf/distro/include/arm-thumb.inc b/conf/distro/include/arm-thumb.inc new file mode 100644 index 0000000000..cd88bb4786 --- /dev/null +++ b/conf/distro/include/arm-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 ?= "no" +# "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" + |