2007-12-19 12:01:17 +00:00
|
|
|
#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.
|
|
|
|
|
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-09 15:00:01 +00:00
|
|
|
OVERRIDE_THUMB = "${@['', ':thumb'][d.getVar('ARM_INSTRUCTION_SET', 1) == 'thumb']}"
|
|
|
|
OVERRIDE_INTERWORK = "${@['', ':thumb-interwork'][d.getVar('THUMB_INTERWORK', 1) == 'yes']}"
|
2007-12-19 12:01:17 +00:00
|
|
|
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.
|
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-09 15:00:01 +00:00
|
|
|
ARM_INTERWORK_M_OPT = "${@['-mno-thumb-interwork', '-mthumb-interwork'][d.getVar('THUMB_INTERWORK', 1) == 'yes']}"
|
2011-12-23 12:25:42 +00:00
|
|
|
ARM_THUMB_M_OPT = "${@['-marm', '-mthumb'][d.getVar('ARM_INSTRUCTION_SET', 1) == 'thumb']}"
|
2007-12-19 12:01:17 +00:00
|
|
|
|
|
|
|
#
|
2011-07-22 14:13:03 +00:00
|
|
|
TUNE_CCARGS += "${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}"
|
2011-12-23 12:25:42 +00:00
|
|
|
TARGET_CC_KERNEL_ARCH += "-mno-thumb-interwork -marm"
|
2007-12-19 12:01:17 +00:00
|
|
|
|