summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-26 11:42:26 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-29 10:17:14 +0100
commit2f0fcb22d7fef814f8cb5a2479ff04a8301bd0ac (patch)
tree475353eda25bb23772342ec6a94a517f5268ea79
parented1555c2ff234355f84a10e1e2e4f075faf91e10 (diff)
downloadpoky-2f0fcb22d7fef814f8cb5a2479ff04a8301bd0ac.tar.gz
bitbake.conf: Use immediate expansion for os.uname()
Use immediate expansion for BUILD_ARCH and BUILD_OS since there is no point in repeatedly calling os.uname() throughout parsing. This is worth around 2% of parsing time, small but measurable. (From OE-Core rev: 03482382b797f3501c3fb0df0fe12bd4e5e51a39) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/conf/bitbake.conf6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 9c72044d8d..2b86442b1d 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -81,8 +81,10 @@ ROOT_HOME ??= "/home/root"
81# Architecture-dependent build variables. 81# Architecture-dependent build variables.
82################################################################## 82##################################################################
83 83
84BUILD_ARCH = "${@os.uname()[4]}" 84# Immediate expansion since there is no point in reapeatedly calling
85BUILD_OS = "${@os.uname()[0].lower()}" 85# os.uname() throughout parsing
86BUILD_ARCH := "${@os.uname()[4]}"
87BUILD_OS := "${@os.uname()[0].lower()}"
86BUILD_VENDOR = "" 88BUILD_VENDOR = ""
87BUILD_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}" 89BUILD_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}"
88BUILD_PREFIX = "" 90BUILD_PREFIX = ""