diff options
author | Antoine Tenart <antoine.tenart@bootlin.com> | 2018-09-20 23:42:27 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-21 18:45:47 -0700 |
commit | 3efeb11bd6c3c930a158cc2cfd7f8f2ec80caf23 (patch) | |
tree | 73165eb4100bc91931fa1330ee8856dc431c5e81 /meta | |
parent | 0ad7337361a1360d20ea33a254b6c7bf7acb7c82 (diff) | |
download | poky-3efeb11bd6c3c930a158cc2cfd7f8f2ec80caf23.tar.gz |
nspr: Add ARC support
[Alexey: Rebased on top of other patches like RiscV, NIOS2 etc]
(From OE-Core rev: bc9259fad8f90f0cbabd3db7509c401b071e4ff3)
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-support/nspr/nspr/0004-Add-ARC-support.patch | 88 | ||||
-rw-r--r-- | meta/recipes-support/nspr/nspr_4.19.bb | 1 |
2 files changed, 89 insertions, 0 deletions
diff --git a/meta/recipes-support/nspr/nspr/0004-Add-ARC-support.patch b/meta/recipes-support/nspr/nspr/0004-Add-ARC-support.patch new file mode 100644 index 0000000000..9d686017df --- /dev/null +++ b/meta/recipes-support/nspr/nspr/0004-Add-ARC-support.patch | |||
@@ -0,0 +1,88 @@ | |||
1 | From 6cb5b0be8837222a1e01745f2cf57cd0e593186d Mon Sep 17 00:00:00 2001 | ||
2 | From: Antoine Tenart <antoine.tenart@free-electrons.com> | ||
3 | Date: Mon, 23 Oct 2017 10:28:20 +0200 | ||
4 | Subject: [PATCH] Add ARC support | ||
5 | |||
6 | [Alexey: Rebased on top of other patches like RiscV, NIOS2 etc]. | ||
7 | |||
8 | Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com> | ||
9 | Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> | ||
10 | |||
11 | Upstream-Status: Submitted [ https://bugzilla.mozilla.org/show_bug.cgi?id=1492378 ] | ||
12 | --- | ||
13 | pr/include/md/_linux.cfg | 45 ++++++++++++++++++++++++++++++++++++++++ | ||
14 | pr/include/md/_linux.h | 2 ++ | ||
15 | 2 files changed, 47 insertions(+) | ||
16 | |||
17 | diff --git a/pr/include/md/_linux.cfg b/pr/include/md/_linux.cfg | ||
18 | index fec8525378dc..5f4fa0eac783 100644 | ||
19 | --- a/pr/include/md/_linux.cfg | ||
20 | +++ b/pr/include/md/_linux.cfg | ||
21 | @@ -1157,6 +1157,51 @@ | ||
22 | #define PR_BYTES_PER_WORD_LOG2 3 | ||
23 | #define PR_BYTES_PER_DWORD_LOG2 3 | ||
24 | |||
25 | +#elif defined(__arc__) | ||
26 | + | ||
27 | +#define IS_LITTLE_ENDIAN 1 | ||
28 | +#undef IS_BIG_ENDIAN | ||
29 | + | ||
30 | +#define PR_BYTES_PER_BYTE 1 | ||
31 | +#define PR_BYTES_PER_SHORT 2 | ||
32 | +#define PR_BYTES_PER_INT 4 | ||
33 | +#define PR_BYTES_PER_INT64 8 | ||
34 | +#define PR_BYTES_PER_LONG 4 | ||
35 | +#define PR_BYTES_PER_FLOAT 4 | ||
36 | +#define PR_BYTES_PER_DOUBLE 8 | ||
37 | +#define PR_BYTES_PER_WORD 4 | ||
38 | +#define PR_BYTES_PER_DWORD 8 | ||
39 | + | ||
40 | +#define PR_BITS_PER_BYTE 8 | ||
41 | +#define PR_BITS_PER_SHORT 16 | ||
42 | +#define PR_BITS_PER_INT 32 | ||
43 | +#define PR_BITS_PER_INT64 64 | ||
44 | +#define PR_BITS_PER_LONG 32 | ||
45 | +#define PR_BITS_PER_FLOAT 32 | ||
46 | +#define PR_BITS_PER_DOUBLE 64 | ||
47 | +#define PR_BITS_PER_WORD 32 | ||
48 | + | ||
49 | +#define PR_BITS_PER_BYTE_LOG2 3 | ||
50 | +#define PR_BITS_PER_SHORT_LOG2 4 | ||
51 | +#define PR_BITS_PER_INT_LOG2 5 | ||
52 | +#define PR_BITS_PER_INT64_LOG2 6 | ||
53 | +#define PR_BITS_PER_LONG_LOG2 5 | ||
54 | +#define PR_BITS_PER_FLOAT_LOG2 5 | ||
55 | +#define PR_BITS_PER_DOUBLE_LOG2 6 | ||
56 | +#define PR_BITS_PER_WORD_LOG2 5 | ||
57 | + | ||
58 | +#define PR_ALIGN_OF_SHORT 2 | ||
59 | +#define PR_ALIGN_OF_INT 4 | ||
60 | +#define PR_ALIGN_OF_LONG 4 | ||
61 | +#define PR_ALIGN_OF_INT64 4 | ||
62 | +#define PR_ALIGN_OF_FLOAT 4 | ||
63 | +#define PR_ALIGN_OF_DOUBLE 4 | ||
64 | +#define PR_ALIGN_OF_POINTER 4 | ||
65 | +#define PR_ALIGN_OF_WORD 4 | ||
66 | + | ||
67 | +#define PR_BYTES_PER_WORD_LOG2 2 | ||
68 | +#define PR_BYTES_PER_DWORD_LOG2 3 | ||
69 | + | ||
70 | #else | ||
71 | |||
72 | #error "Unknown CPU architecture" | ||
73 | diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h | ||
74 | index 8e04fad479a1..628b1217e9c8 100644 | ||
75 | --- a/pr/include/md/_linux.h | ||
76 | +++ b/pr/include/md/_linux.h | ||
77 | @@ -63,6 +63,8 @@ | ||
78 | #define _PR_SI_ARCHITECTURE "riscv32" | ||
79 | #elif defined(__riscv) && (__riscv_xlen == 64) | ||
80 | #define _PR_SI_ARCHITECTURE "riscv64" | ||
81 | +#elif defined(__arc__) | ||
82 | +#define _PR_SI_ARCHITECTURE "arc" | ||
83 | #else | ||
84 | #error "Unknown CPU architecture" | ||
85 | #endif | ||
86 | -- | ||
87 | 2.17.1 | ||
88 | |||
diff --git a/meta/recipes-support/nspr/nspr_4.19.bb b/meta/recipes-support/nspr/nspr_4.19.bb index b5264be2a0..0212be7f40 100644 --- a/meta/recipes-support/nspr/nspr_4.19.bb +++ b/meta/recipes-support/nspr/nspr_4.19.bb | |||
@@ -12,6 +12,7 @@ SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz | |||
12 | file://0002-Add-nios2-support.patch \ | 12 | file://0002-Add-nios2-support.patch \ |
13 | file://0001-md-Fix-build-with-musl.patch \ | 13 | file://0001-md-Fix-build-with-musl.patch \ |
14 | file://0003-Add-type-definitions-for-the-RISC-V-architecture.patch \ | 14 | file://0003-Add-type-definitions-for-the-RISC-V-architecture.patch \ |
15 | file://0004-Add-ARC-support.patch \ | ||
15 | file://nspr.pc.in \ | 16 | file://nspr.pc.in \ |
16 | " | 17 | " |
17 | 18 | ||