diff options
Diffstat (limited to 'meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0008-add-riscv-support.patch')
-rw-r--r-- | meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0008-add-riscv-support.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0008-add-riscv-support.patch b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0008-add-riscv-support.patch new file mode 100644 index 000000000..0a4148561 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0008-add-riscv-support.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | Add RISC-V support | ||
2 | |||
3 | Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1318905] | ||
4 | |||
5 | Signed-off-by: Ricardo Salveti <ricardo@foundries.io> | ||
6 | |||
7 | --- a/build/autoconf/config.guess | ||
8 | +++ b/build/autoconf/config.guess | ||
9 | @@ -1029,6 +1029,9 @@ EOF | ||
10 | ppcle:Linux:*:*) | ||
11 | echo powerpcle-unknown-linux-${LIBC} | ||
12 | exit ;; | ||
13 | + riscv32:Linux:*:* | riscv64:Linux:*:*) | ||
14 | + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | ||
15 | + exit ;; | ||
16 | s390:Linux:*:* | s390x:Linux:*:*) | ||
17 | echo ${UNAME_MACHINE}-ibm-linux-${LIBC} | ||
18 | exit ;; | ||
19 | --- a/build/moz.configure/init.configure | ||
20 | +++ b/build/moz.configure/init.configure | ||
21 | @@ -658,6 +658,9 @@ def split_triplet(triplet, allow_unknown | ||
22 | elif cpu == 'sh4': | ||
23 | canonical_cpu = 'sh4' | ||
24 | endianness = 'little' | ||
25 | + elif cpu in ('riscv32', 'riscv64'): | ||
26 | + canonical_cpu = cpu | ||
27 | + endianness = 'little' | ||
28 | elif allow_unknown: | ||
29 | canonical_cpu = cpu | ||
30 | endianness = 'unknown' | ||
31 | --- a/python/mozbuild/mozbuild/configure/constants.py | ||
32 | +++ b/python/mozbuild/mozbuild/configure/constants.py | ||
33 | @@ -50,6 +50,8 @@ CPU_bitness = { | ||
34 | 'mips64': 64, | ||
35 | 'ppc': 32, | ||
36 | 'ppc64': 64, | ||
37 | + 'riscv32': 32, | ||
38 | + 'riscv64': 64, | ||
39 | 's390': 32, | ||
40 | 's390x': 64, | ||
41 | 'sh4': 32, | ||
42 | @@ -82,6 +84,8 @@ CPU_preprocessor_checks = OrderedDict(( | ||
43 | ('s390', '__s390__'), | ||
44 | ('ppc64', '__powerpc64__'), | ||
45 | ('ppc', '__powerpc__'), | ||
46 | + ('riscv32', '__riscv && __SIZEOF_POINTER__ == 4'), | ||
47 | + ('riscv64', '__riscv && __SIZEOF_POINTER__ == 8'), | ||
48 | ('Alpha', '__alpha__'), | ||
49 | ('hppa', '__hppa__'), | ||
50 | ('sparc64', '__sparc__ && __arch64__'), | ||