opendreambox: move GLIBC_EXTRA_OECONF to machine default config, allow to override...
[vuplus_openembedded] / conf / machine / include / tune-thumb.inc
1 #tune file for thumb instructions
2
3 ARM_INSTRUCTION_SET ?= "arm"
4 # "arm" "thumb"
5 #    The instruction set the compiler should use when generating application
6 #    code.  The kernel is always compiled with arm code at present.  arm code
7 #    is the original 32 bit ARM instruction set, thumb code is the 16 bit
8 #    encoded RISC sub-set.  Thumb code is smaller (maybe 70% of the ARM size)
9 #    but requires more instructions (140% for 70% smaller code) so may be
10 #    slower.
11
12 THUMB_INTERWORK ?= "no"
13 # "yes" "no"
14 #    Whether to compile with code to allow interworking between the two
15 #    instruction sets.  This allows thumb code to be executed on a primarily
16 #    arm system and vice versa.  It is strongly recommended that DISTROs not
17 #    turn this off - the actual cost is very small.
18
19 OVERRIDE_THUMB = "${@['', ':thumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}"
20 OVERRIDE_INTERWORK = "${@['', ':thumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}"
21 OVERRIDES .= "${OVERRIDE_THUMB}${OVERRIDE_INTERWORK}"
22
23 #    Compiler and linker options for application code and kernel code.  These
24 #    options ensure that the compiler has the correct settings for the selected
25 #    instruction set and interworking.
26 ARM_INTERWORK_M_OPT = "${@['-mno-thumb-interwork', '-mthumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}"
27 ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}"
28
29 #
30 TARGET_CC_ARCH +=  "${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}"
31 TARGET_CC_KERNEL_ARCH  += "-mno-thumb-interwork -mno-thumb"
32