diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-09 15:00:01 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-10 11:51:19 +0000 |
commit | c8dee9b92dfd545852ecac8dc2adfc95ac02e957 (patch) | |
tree | 5f1b86954646a0f3bb914407994388a6a4346769 /meta/conf | |
parent | 5d3860f4a8abb8e95442b04f8b84a333af362fcd (diff) | |
download | poky-c8dee9b92dfd545852ecac8dc2adfc95ac02e957.tar.gz |
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>
Diffstat (limited to 'meta/conf')
-rw-r--r-- | meta/conf/bitbake.conf | 36 | ||||
-rw-r--r-- | meta/conf/distro/defaultsetup.conf | 2 | ||||
-rw-r--r-- | meta/conf/machine/include/arm/feature-arm-thumb.inc | 2 | ||||
-rw-r--r-- | meta/conf/machine/include/tune-thumb.inc | 8 |
4 files changed, 24 insertions, 24 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index d405b6a7ff..7e75be2d78 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf | |||
@@ -99,7 +99,7 @@ ABIEXTENSION ??= "" | |||
99 | TARGET_ARCH = "${TUNE_ARCH}" | 99 | TARGET_ARCH = "${TUNE_ARCH}" |
100 | TARGET_OS = "linux${LIBCEXTENSION}${ABIEXTENSION}" | 100 | TARGET_OS = "linux${LIBCEXTENSION}${ABIEXTENSION}" |
101 | TARGET_VENDOR = "-oe" | 101 | TARGET_VENDOR = "-oe" |
102 | TARGET_SYS = "${TARGET_ARCH}${TARGET_VENDOR}${@['-' + bb.data.getVar('TARGET_OS', d, 1), ''][bb.data.getVar('TARGET_OS', d, 1) == ('' or 'custom')]}" | 102 | TARGET_SYS = "${TARGET_ARCH}${TARGET_VENDOR}${@['-' + d.getVar('TARGET_OS', 1), ''][d.getVar('TARGET_OS', 1) == ('' or 'custom')]}" |
103 | TARGET_PREFIX = "${TARGET_SYS}-" | 103 | TARGET_PREFIX = "${TARGET_SYS}-" |
104 | TARGET_CC_ARCH = "${TUNE_CCARGS}" | 104 | TARGET_CC_ARCH = "${TUNE_CCARGS}" |
105 | TARGET_LD_ARCH = "${TUNE_LDARGS}" | 105 | TARGET_LD_ARCH = "${TUNE_LDARGS}" |
@@ -108,7 +108,7 @@ TARGET_AS_ARCH = "${TUNE_ASARGS}" | |||
108 | SDK_ARCH = "${BUILD_ARCH}" | 108 | SDK_ARCH = "${BUILD_ARCH}" |
109 | SDK_OS = "${BUILD_OS}" | 109 | SDK_OS = "${BUILD_OS}" |
110 | SDK_VENDOR = "-oesdk" | 110 | SDK_VENDOR = "-oesdk" |
111 | SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + bb.data.getVar('SDK_OS', d, 1), ''][bb.data.getVar('SDK_OS', d, 1) == ('' or 'custom')]}" | 111 | SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + d.getVar('SDK_OS', 1), ''][d.getVar('SDK_OS', 1) == ('' or 'custom')]}" |
112 | SDK_PREFIX = "${SDK_SYS}-" | 112 | SDK_PREFIX = "${SDK_SYS}-" |
113 | SDK_CC_ARCH = "${BUILD_CC_ARCH}" | 113 | SDK_CC_ARCH = "${BUILD_CC_ARCH}" |
114 | SDK_PACKAGE_ARCHS = "all any noarch ${SDK_ARCH}-nativesdk" | 114 | SDK_PACKAGE_ARCHS = "all any noarch ${SDK_ARCH}-nativesdk" |
@@ -116,7 +116,7 @@ SDK_LD_ARCH = "${BUILD_LD_ARCH}" | |||
116 | SDK_AS_ARCH = "${BUILD_AS_ARCH}" | 116 | SDK_AS_ARCH = "${BUILD_AS_ARCH}" |
117 | 117 | ||
118 | PACKAGE_ARCH = "${TUNE_PKGARCH}" | 118 | PACKAGE_ARCH = "${TUNE_PKGARCH}" |
119 | MACHINE_ARCH = "${@[bb.data.getVar('TUNE_PKGARCH', d, 1), bb.data.getVar('MACHINE', d, 1)][bool(bb.data.getVar('MACHINE', d, 1))].replace('-', '_')}" | 119 | MACHINE_ARCH = "${@[d.getVar('TUNE_PKGARCH', 1), d.getVar('MACHINE', 1)][bool(d.getVar('MACHINE', 1))].replace('-', '_')}" |
120 | PACKAGE_EXTRA_ARCHS ??= "${PACKAGE_EXTRA_ARCHS_tune-${DEFAULTTUNE}}" | 120 | PACKAGE_EXTRA_ARCHS ??= "${PACKAGE_EXTRA_ARCHS_tune-${DEFAULTTUNE}}" |
121 | PACKAGE_ARCHS = "all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}" | 121 | PACKAGE_ARCHS = "all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}" |
122 | # MACHINE_ARCH shouldn't be included here as a variable dependency | 122 | # MACHINE_ARCH shouldn't be included here as a variable dependency |
@@ -167,33 +167,33 @@ ASSUME_PROVIDED = "\ | |||
167 | # Package default variables. | 167 | # Package default variables. |
168 | ################################################################## | 168 | ################################################################## |
169 | 169 | ||
170 | PN = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[0] or 'defaultpkgname'}" | 170 | PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[0] or 'defaultpkgname'}" |
171 | PV = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[1] or '1.0'}" | 171 | PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[1] or '1.0'}" |
172 | PR = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[2] or 'r0'}" | 172 | PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[2] or 'r0'}" |
173 | PF = "${PN}-${EXTENDPE}${PV}-${PR}" | 173 | PF = "${PN}-${EXTENDPE}${PV}-${PR}" |
174 | EXTENDPE = "${@['','${PE\x7d_'][bb.data.getVar('PE',d,1) > 0]}" | 174 | EXTENDPE = "${@['','${PE\x7d_'][d.getVar('PE',1) > 0]}" |
175 | P = "${PN}-${PV}" | 175 | P = "${PN}-${PV}" |
176 | 176 | ||
177 | EXTENDPRAUTO = "${@['.${PRAUTO\x7d',''][bb.data.getVar('PRAUTO',d,1) is None]}" | 177 | EXTENDPRAUTO = "${@['.${PRAUTO\x7d',''][d.getVar('PRAUTO',1) is None]}" |
178 | PRAUTOINX = "${PF}" | 178 | PRAUTOINX = "${PF}" |
179 | 179 | ||
180 | PKGV ?= "${PV}" | 180 | PKGV ?= "${PV}" |
181 | PKGR ?= "${PR}${EXTENDPRAUTO}" | 181 | PKGR ?= "${PR}${EXTENDPRAUTO}" |
182 | PKGE ?= "${@['','${PE\x7d'][bb.data.getVar('PE',d,1) > 0]}" | 182 | PKGE ?= "${@['','${PE\x7d'][d.getVar('PE',1) > 0]}" |
183 | EXTENDPKGEVER = "${@['','${PKGE\x7d:'][bb.data.getVar('PKGE',d,1).strip() != '']}" | 183 | EXTENDPKGEVER = "${@['','${PKGE\x7d:'][d.getVar('PKGE',1).strip() != '']}" |
184 | EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}" | 184 | EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}" |
185 | 185 | ||
186 | # Base package name | 186 | # Base package name |
187 | # Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial" | 187 | # Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial" |
188 | # otherwise it is the same as PN and P | 188 | # otherwise it is the same as PN and P |
189 | SPECIAL_PKGSUFFIX = "-native -cross -initial -intermediate -nativesdk -crosssdk -cross-canadian" | 189 | SPECIAL_PKGSUFFIX = "-native -cross -initial -intermediate -nativesdk -crosssdk -cross-canadian" |
190 | BPN = "${@base_prune_suffix(bb.data.getVar('PN', d, True), bb.data.getVar('SPECIAL_PKGSUFFIX', d, True).split(), d)}" | 190 | BPN = "${@base_prune_suffix(d.getVar('PN', True), d.getVar('SPECIAL_PKGSUFFIX', True).split(), d)}" |
191 | BP = "${BPN}-${PV}" | 191 | BP = "${BPN}-${PV}" |
192 | 192 | ||
193 | # | 193 | # |
194 | # network based PR service | 194 | # network based PR service |
195 | # | 195 | # |
196 | USE_PR_SERV = "${@[1,0][(bb.data.getVar('PRSERV_HOST',d,1) is None) or (bb.data.getVar('PRSERV_PORT',d,1) is None)]}" | 196 | USE_PR_SERV = "${@[1,0][(d.getVar('PRSERV_HOST',1) is None) or (d.getVar('PRSERV_PORT',1) is None)]}" |
197 | 197 | ||
198 | # Package info. | 198 | # Package info. |
199 | 199 | ||
@@ -288,7 +288,7 @@ DOTDEBUG-dbg = "${bindir}/.debug ${sbindir}/.debug ${libexecdir}/.debug ${libdir | |||
288 | 288 | ||
289 | DEBUGFILEDIRECTORY-dbg = "/usr/lib/debug /usr/src/debug" | 289 | DEBUGFILEDIRECTORY-dbg = "/usr/lib/debug /usr/src/debug" |
290 | 290 | ||
291 | FILES_${PN}-dbg = "${@bb.data.getVar(['DOTDEBUG-dbg', 'DEBUGFILEDIRECTORY-dbg'][bb.data.getVar('PACKAGE_DEBUG_SPLIT_STYLE', d, 1) == 'debug-file-directory'], d, 1)}" | 291 | FILES_${PN}-dbg = "${@bb.data.getVar(['DOTDEBUG-dbg', 'DEBUGFILEDIRECTORY-dbg'][d.getVar('PACKAGE_DEBUG_SPLIT_STYLE', 1) == 'debug-file-directory'], d, 1)}" |
292 | 292 | ||
293 | SECTION_${PN}-dbg = "devel" | 293 | SECTION_${PN}-dbg = "devel" |
294 | ALLOW_EMPTY_${PN}-dbg = "1" | 294 | ALLOW_EMPTY_${PN}-dbg = "1" |
@@ -298,17 +298,17 @@ FILES_${PN}-locale = "${datadir}/locale" | |||
298 | 298 | ||
299 | # File manifest | 299 | # File manifest |
300 | 300 | ||
301 | FILE_DIRNAME = "${@os.path.dirname(bb.data.getVar('FILE', d))}" | 301 | FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE'))}" |
302 | # FILESPATH is set in base.bbclass | 302 | # FILESPATH is set in base.bbclass |
303 | #FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/${BP}:${FILE_DIRNAME}/${BPN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}" | 303 | #FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/${BP}:${FILE_DIRNAME}/${BPN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}" |
304 | FILESDIR = "${@bb.which(bb.data.getVar('FILESPATH', d, 1), '.')}" | 304 | FILESDIR = "${@bb.which(d.getVar('FILESPATH', 1), '.')}" |
305 | 305 | ||
306 | ################################################################## | 306 | ################################################################## |
307 | # General work and output directories for the build system. | 307 | # General work and output directories for the build system. |
308 | ################################################################## | 308 | ################################################################## |
309 | 309 | ||
310 | TMPDIR ?= "${TOPDIR}/tmp" | 310 | TMPDIR ?= "${TOPDIR}/tmp" |
311 | CACHE = "${TMPDIR}/cache${@['', '/' + str(bb.data.getVar('MACHINE', d, 1))][bool(bb.data.getVar('MACHINE', d, 1))]}${@['', '/' + str(bb.data.getVar('SDKMACHINE', d, 1))][bool(bb.data.getVar('SDKMACHINE', d, 1))]}" | 311 | CACHE = "${TMPDIR}/cache${@['', '/' + str(d.getVar('MACHINE', 1))][bool(d.getVar('MACHINE', 1))]}${@['', '/' + str(d.getVar('SDKMACHINE', 1))][bool(d.getVar('SDKMACHINE', 1))]}" |
312 | # The persistent cache should be shared by all builds | 312 | # The persistent cache should be shared by all builds |
313 | PERSISTENT_DIR = "${TMPDIR}/cache" | 313 | PERSISTENT_DIR = "${TMPDIR}/cache" |
314 | LOG_DIR = "${TMPDIR}/log" | 314 | LOG_DIR = "${TMPDIR}/log" |
@@ -403,7 +403,7 @@ export PATH | |||
403 | # Build utility info. | 403 | # Build utility info. |
404 | ################################################################## | 404 | ################################################################## |
405 | 405 | ||
406 | CCACHE = "${@bb.which(bb.data.getVar('PATH', d, 1), 'ccache') and 'ccache '}" | 406 | CCACHE = "${@bb.which(d.getVar('PATH', 1), 'ccache') and 'ccache '}" |
407 | TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}" | 407 | TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}" |
408 | 408 | ||
409 | export CCACHE_DIR = "${TMPDIR}/ccache/${MULTIMACH_HOST_SYS}/${PN}" | 409 | export CCACHE_DIR = "${TMPDIR}/ccache/${MULTIMACH_HOST_SYS}/${PN}" |
@@ -505,7 +505,7 @@ DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types" | |||
505 | # Disabled until the option works properly -feliminate-dwarf2-dups | 505 | # Disabled until the option works properly -feliminate-dwarf2-dups |
506 | FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}" | 506 | FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}" |
507 | DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe" | 507 | DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe" |
508 | SELECTED_OPTIMIZATION = "${@bb.data.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][bb.data.getVar('DEBUG_BUILD', d, 1) == '1'], d, 1)}" | 508 | SELECTED_OPTIMIZATION = "${@bb.data.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][d.getVar('DEBUG_BUILD', 1) == '1'], d, 1)}" |
509 | BUILD_OPTIMIZATION = "-O2 -pipe" | 509 | BUILD_OPTIMIZATION = "-O2 -pipe" |
510 | 510 | ||
511 | ################################################################## | 511 | ################################################################## |
diff --git a/meta/conf/distro/defaultsetup.conf b/meta/conf/distro/defaultsetup.conf index 1a297785fd..064c1e0537 100644 --- a/meta/conf/distro/defaultsetup.conf +++ b/meta/conf/distro/defaultsetup.conf | |||
@@ -13,7 +13,7 @@ require conf/distro/include/tclibc-${TCLIBC}.inc | |||
13 | TCLIBCAPPEND ?= "-${TCLIBC}" | 13 | TCLIBCAPPEND ?= "-${TCLIBC}" |
14 | TMPDIR .= "${TCLIBCAPPEND}" | 14 | TMPDIR .= "${TCLIBCAPPEND}" |
15 | 15 | ||
16 | CACHE = "${TMPDIR}/cache/${TCMODE}-${TCLIBC}${@['', '/' + str(bb.data.getVar('MACHINE', d, 1))][bool(bb.data.getVar('MACHINE', d, 1))]}${@['', '/' + str(bb.data.getVar('SDKMACHINE', d, 1))][bool(bb.data.getVar('SDKMACHINE', d, 1))]}" | 16 | CACHE = "${TMPDIR}/cache/${TCMODE}-${TCLIBC}${@['', '/' + str(d.getVar('MACHINE', 1))][bool(d.getVar('MACHINE', 1))]}${@['', '/' + str(d.getVar('SDKMACHINE', 1))][bool(d.getVar('SDKMACHINE', 1))]}" |
17 | 17 | ||
18 | USER_CLASSES ?= "" | 18 | USER_CLASSES ?= "" |
19 | PACKAGE_CLASSES ?= "package_ipk" | 19 | PACKAGE_CLASSES ?= "package_ipk" |
diff --git a/meta/conf/machine/include/arm/feature-arm-thumb.inc b/meta/conf/machine/include/arm/feature-arm-thumb.inc index d606a35ca9..cd34199b04 100644 --- a/meta/conf/machine/include/arm/feature-arm-thumb.inc +++ b/meta/conf/machine/include/arm/feature-arm-thumb.inc | |||
@@ -5,7 +5,7 @@ | |||
5 | # but requires more instructions (140% for 70% smaller code) so may be | 5 | # but requires more instructions (140% for 70% smaller code) so may be |
6 | # slower. | 6 | # slower. |
7 | TUNEVALID[thumb] = "Use thumb instructions instead of ARM" | 7 | TUNEVALID[thumb] = "Use thumb instructions instead of ARM" |
8 | ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" | 8 | ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][d.getVar('ARM_INSTRUCTION_SET', 1) == 'thumb']}" |
9 | TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "thumb", "${ARM_THUMB_M_OPT}", "", d)}" | 9 | TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "thumb", "${ARM_THUMB_M_OPT}", "", d)}" |
10 | OVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "thumb", ":thumb", "", d)}" | 10 | OVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "thumb", ":thumb", "", d)}" |
11 | 11 | ||
diff --git a/meta/conf/machine/include/tune-thumb.inc b/meta/conf/machine/include/tune-thumb.inc index 9f6ce95a47..85473ce741 100644 --- a/meta/conf/machine/include/tune-thumb.inc +++ b/meta/conf/machine/include/tune-thumb.inc | |||
@@ -16,15 +16,15 @@ THUMB_INTERWORK ?= "yes" | |||
16 | # arm system and vice versa. It is strongly recommended that DISTROs not | 16 | # arm system and vice versa. It is strongly recommended that DISTROs not |
17 | # turn this off - the actual cost is very small. | 17 | # turn this off - the actual cost is very small. |
18 | 18 | ||
19 | OVERRIDE_THUMB = "${@['', ':thumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" | 19 | OVERRIDE_THUMB = "${@['', ':thumb'][d.getVar('ARM_INSTRUCTION_SET', 1) == 'thumb']}" |
20 | OVERRIDE_INTERWORK = "${@['', ':thumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" | 20 | OVERRIDE_INTERWORK = "${@['', ':thumb-interwork'][d.getVar('THUMB_INTERWORK', 1) == 'yes']}" |
21 | OVERRIDES .= "${OVERRIDE_THUMB}${OVERRIDE_INTERWORK}" | 21 | OVERRIDES .= "${OVERRIDE_THUMB}${OVERRIDE_INTERWORK}" |
22 | 22 | ||
23 | # Compiler and linker options for application code and kernel code. These | 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 | 24 | # options ensure that the compiler has the correct settings for the selected |
25 | # instruction set and interworking. | 25 | # instruction set and interworking. |
26 | ARM_INTERWORK_M_OPT = "${@['-mno-thumb-interwork', '-mthumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" | 26 | ARM_INTERWORK_M_OPT = "${@['-mno-thumb-interwork', '-mthumb-interwork'][d.getVar('THUMB_INTERWORK', 1) == 'yes']}" |
27 | ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" | 27 | ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][d.getVar('ARM_INSTRUCTION_SET', 1) == 'thumb']}" |
28 | 28 | ||
29 | # | 29 | # |
30 | TUNE_CCARGS += "${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}" | 30 | TUNE_CCARGS += "${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}" |