mirror of
https://git.yoctoproject.org/poky
synced 2026-03-06 15:29:40 +01:00
Using "1" with getVar is bad coding style and "True" is preferred. This patch is a sed over the meta directory of the form: sed \ -e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \ -e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \ -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
27 lines
1.7 KiB
PHP
27 lines
1.7 KiB
PHP
# 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.
|
|
TUNEVALID[thumb] = "Use thumb instructions instead of ARM"
|
|
ARM_THUMB_M_OPT = "${@['-marm', '-mthumb'][d.getVar('ARM_INSTRUCTION_SET', True) == 'thumb']}"
|
|
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "thumb", "${ARM_THUMB_M_OPT}", "", d)}"
|
|
OVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "thumb", ":thumb", "", d)}"
|
|
|
|
# Note armv7 will hit on armv7a as well
|
|
ARMPKGSFX_THUMB .= "${@bb.utils.contains("TUNE_FEATURES", [ "armv4", "thumb" ], "t", "", d)}"
|
|
ARMPKGSFX_THUMB .= "${@bb.utils.contains("TUNE_FEATURES", [ "armv5", "thumb" ], "t", "", d)}"
|
|
ARMPKGSFX_THUMB .= "${@bb.utils.contains("TUNE_FEATURES", [ "armv6", "thumb" ], "t", "", d)}"
|
|
ARMPKGSFX_THUMB .= "${@bb.utils.contains("TUNE_FEATURES", [ "armv7", "thumb" ], "t2", "", d)}"
|
|
|
|
# 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.
|
|
TUNEVALID[no-thumb-interwork] = "Disable mixing of thumb and ARM functions"
|
|
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "no-thumb-interwork", "-mno-thumb-interwork", "-mthumb-interwork", d)}"
|
|
OVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "no-thumb-interwork", ":thumb-interwork", "", d)}"
|
|
|
|
TARGET_CC_KERNEL_ARCH += "-mno-thumb-interwork -marm"
|