From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
To: openembedded-core@lists.openembedded.org
Cc: Antoine Tenart <antoine.tenart@bootlin.com>,
linux-snps-arc@lists.infradead.org,
Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Subject: [PATCH 05/10] nspr: Add ARC support
Date: Tue, 18 Sep 2018 00:29:38 +0300 [thread overview]
Message-ID: <20180917212943.27237-6-abrodkin@synopsys.com> (raw)
In-Reply-To: <20180917212943.27237-1-abrodkin@synopsys.com>
From: Antoine Tenart <antoine.tenart@bootlin.com>
[Alexey: Rebased on top of other patches like RiscV, NIOS2 etc]
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
---
.../nspr/nspr/0004-Add-ARC-support.patch | 86 ++++++++++++++++++++++
meta/recipes-support/nspr/nspr_4.19.bb | 1 +
2 files changed, 87 insertions(+)
create mode 100644 meta/recipes-support/nspr/nspr/0004-Add-ARC-support.patch
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 0000000..dda1928
--- /dev/null
+++ b/meta/recipes-support/nspr/nspr/0004-Add-ARC-support.patch
@@ -0,0 +1,86 @@
+From 6cb5b0be8837222a1e01745f2cf57cd0e593186d Mon Sep 17 00:00:00 2001
+From: Antoine Tenart <antoine.tenart@free-electrons.com>
+Date: Mon, 23 Oct 2017 10:28:20 +0200
+Subject: [PATCH] Add ARC support
+
+[Alexey: Rebased on top of other patches like RiscV, NIOS2 etc].
+
+Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
+Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
+---
+ pr/include/md/_linux.cfg | 45 ++++++++++++++++++++++++++++++++++++++++
+ pr/include/md/_linux.h | 2 ++
+ 2 files changed, 47 insertions(+)
+
+diff --git a/pr/include/md/_linux.cfg b/pr/include/md/_linux.cfg
+index fec8525378dc..5f4fa0eac783 100644
+--- a/pr/include/md/_linux.cfg
++++ b/pr/include/md/_linux.cfg
+@@ -1157,6 +1157,51 @@
+ #define PR_BYTES_PER_WORD_LOG2 3
+ #define PR_BYTES_PER_DWORD_LOG2 3
+
++#elif defined(__arc__)
++
++#define IS_LITTLE_ENDIAN 1
++#undef IS_BIG_ENDIAN
++
++#define PR_BYTES_PER_BYTE 1
++#define PR_BYTES_PER_SHORT 2
++#define PR_BYTES_PER_INT 4
++#define PR_BYTES_PER_INT64 8
++#define PR_BYTES_PER_LONG 4
++#define PR_BYTES_PER_FLOAT 4
++#define PR_BYTES_PER_DOUBLE 8
++#define PR_BYTES_PER_WORD 4
++#define PR_BYTES_PER_DWORD 8
++
++#define PR_BITS_PER_BYTE 8
++#define PR_BITS_PER_SHORT 16
++#define PR_BITS_PER_INT 32
++#define PR_BITS_PER_INT64 64
++#define PR_BITS_PER_LONG 32
++#define PR_BITS_PER_FLOAT 32
++#define PR_BITS_PER_DOUBLE 64
++#define PR_BITS_PER_WORD 32
++
++#define PR_BITS_PER_BYTE_LOG2 3
++#define PR_BITS_PER_SHORT_LOG2 4
++#define PR_BITS_PER_INT_LOG2 5
++#define PR_BITS_PER_INT64_LOG2 6
++#define PR_BITS_PER_LONG_LOG2 5
++#define PR_BITS_PER_FLOAT_LOG2 5
++#define PR_BITS_PER_DOUBLE_LOG2 6
++#define PR_BITS_PER_WORD_LOG2 5
++
++#define PR_ALIGN_OF_SHORT 2
++#define PR_ALIGN_OF_INT 4
++#define PR_ALIGN_OF_LONG 4
++#define PR_ALIGN_OF_INT64 4
++#define PR_ALIGN_OF_FLOAT 4
++#define PR_ALIGN_OF_DOUBLE 4
++#define PR_ALIGN_OF_POINTER 4
++#define PR_ALIGN_OF_WORD 4
++
++#define PR_BYTES_PER_WORD_LOG2 2
++#define PR_BYTES_PER_DWORD_LOG2 3
++
+ #else
+
+ #error "Unknown CPU architecture"
+diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h
+index 8e04fad479a1..628b1217e9c8 100644
+--- a/pr/include/md/_linux.h
++++ b/pr/include/md/_linux.h
+@@ -63,6 +63,8 @@
+ #define _PR_SI_ARCHITECTURE "riscv32"
+ #elif defined(__riscv) && (__riscv_xlen == 64)
+ #define _PR_SI_ARCHITECTURE "riscv64"
++#elif defined(__arc__)
++#define _PR_SI_ARCHITECTURE "arc"
+ #else
+ #error "Unknown CPU architecture"
+ #endif
+--
+2.17.1
+
diff --git a/meta/recipes-support/nspr/nspr_4.19.bb b/meta/recipes-support/nspr/nspr_4.19.bb
index b5264be..0212be7 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
file://0002-Add-nios2-support.patch \
file://0001-md-Fix-build-with-musl.patch \
file://0003-Add-type-definitions-for-the-RISC-V-architecture.patch \
+ file://0004-Add-ARC-support.patch \
file://nspr.pc.in \
"
--
1.8.3.1
next prev parent reply other threads:[~2018-09-17 21:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-17 21:29 [PATCH 00/10] Introduce ARC port of OpenEmbedded Alexey Brodkin
2018-09-17 21:29 ` [PATCH 01/10] siteinfo: Define data for ARC Alexey Brodkin
2018-09-18 23:24 ` Khem Raj
2018-09-17 21:29 ` [PATCH 02/10] site: Add ARC linux Alexey Brodkin
2018-09-17 21:29 ` [PATCH 03/10] kernel-arch.bbclass: Add ARC to kernel arch map Alexey Brodkin
2018-09-17 21:29 ` [PATCH 04/10] openssl: Add support for ARC Alexey Brodkin
2018-09-17 21:29 ` Alexey Brodkin [this message]
2018-09-17 21:29 ` [PATCH 06/10] libgpg-error: Add ARC support Alexey Brodkin
2018-09-17 21:29 ` [PATCH 07/10] icu: " Alexey Brodkin
2018-09-17 21:29 ` [PATCH 08/10] gcc: Disable libitm for ARC Alexey Brodkin
2018-09-17 21:29 ` [PATCH 09/10] binutils: Fix Glibc building " Alexey Brodkin
2018-09-17 21:29 ` [PATCH 10/10] gcc: Fix specs generation " Alexey Brodkin
2018-09-18 23:21 ` Khem Raj
2018-09-17 22:04 ` ✗ patchtest: failure for Introduce ARC port of OpenEmbedded Patchwork
2018-09-18 23:28 ` [PATCH 00/10] " Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180917212943.27237-6-abrodkin@synopsys.com \
--to=alexey.brodkin@synopsys.com \
--cc=antoine.tenart@bootlin.com \
--cc=linux-snps-arc@lists.infradead.org \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox