summaryrefslogtreecommitdiff
path: root/meta-phosphor/common/recipes-devtools
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2018-02-13 01:29:16 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-02-19 20:23:07 +0300
commitc869fcc9fceff4cefc4d73668dc08b537e941446 (patch)
tree3559cacb222e8fc0cefe96c33d8ab3ab3347a43d /meta-phosphor/common/recipes-devtools
parent0b7b7a147909209266c0b70a5c23436cb4ad4d09 (diff)
downloadopenbmc-c869fcc9fceff4cefc4d73668dc08b537e941446.tar.xz
Add support for building on ppc64le
ppc64le is a little-endian mode of ppc64. Nodejs determines the endianness of the system and since it already supports bi-endian ppc64, just pass nodejs "ppc64" when the TARGET_ARCH is ppc64le. A patch has been submitted to openembedded: http://lists.openembedded.org/pipermail/openembedded-devel/2018-February/116737.html Until we move to a version of Yocto that has this patch, override the map_nodejs_arch function in a bbappend. This works because in Python "when you define a new function with the same name as a previously defined function, the function name is now bound to the new function object, and the old function object is reclaimed by the garbage collector." Resolves openbmc/openbmc#2907 Tested:Built OpenBMC on a ppc64le system. Change-Id: Ie6a48a5cd1825eb71d9fd5f734f3057bed7d780d Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Diffstat (limited to 'meta-phosphor/common/recipes-devtools')
-rw-r--r--meta-phosphor/common/recipes-devtools/nodejs/nodejs_4.6.1.bbappend12
1 files changed, 12 insertions, 0 deletions
diff --git a/meta-phosphor/common/recipes-devtools/nodejs/nodejs_4.6.1.bbappend b/meta-phosphor/common/recipes-devtools/nodejs/nodejs_4.6.1.bbappend
new file mode 100644
index 000000000..a70300d86
--- /dev/null
+++ b/meta-phosphor/common/recipes-devtools/nodejs/nodejs_4.6.1.bbappend
@@ -0,0 +1,12 @@
+# Overriding map_nodejs_arch() is needed to support building nodejs on ppc64le
+# We can remove this, once OpenBMC moves to a version of Yocto with
+# http://lists.openembedded.org/pipermail/openembedded-devel/2018-February/116737.html
+def map_nodejs_arch(a, d):
+ import re
+
+ if re.match('i.86$', a): return 'ia32'
+ elif re.match('x86_64$', a): return 'x64'
+ elif re.match('aarch64$', a): return 'arm64'
+ elif re.match('(powerpc64|ppc64le)$', a): return 'ppc64'
+ elif re.match('powerpc$', a): return 'ppc'
+ return a