mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-19 16:40:46 -09:00
libnspr: use __nios2__ instead of nios2
Our patch adding nios2 support to libnspr uses the built-in compiler
define "nios2". However, this doesn't work with C++11, where only the
__nios2__ define is available. Since __nios2__ is always available,
use that instead:
$ ./output/host/usr/bin/nios2-linux-gcc -dM -E - < /dev/null | grep -E "( nios2 | __nios2__ )"
$ ./output/host/usr/bin/nios2-linux-gcc -std=c++11 -x c++ -dM -E - < /dev/null | grep -E "( nios2 | __nios2__ )"
Patch 0001-nios2.patch is therefore changed to use __nios2__ (the rest
of the change noise is due to using quilt to format the patch). Patch
0002-microblaze.patch is simply updated to apply correctly on top of
the modified 0001-nios2.patch.
This fixes the build of the poppler library on nios2. It is built with
-std=c++11, and includes nspr headers (through nss), causing a build
issue.
Fixes:
http://autobuild.buildroot.net/results/9fee58076157d814616fa0da51afde8da21a8973/
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
(cherry picked from commit 9a521546ed)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
committed by
Peter Korsgaard
parent
6257bf6588
commit
9d302e43c9
@@ -3,14 +3,15 @@ Add Nios-II support
|
|||||||
[Gustavo: update for nspr 4.10.9]
|
[Gustavo: update for nspr 4.10.9]
|
||||||
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
|
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
|
||||||
|
|
||||||
diff -Nura nspr-4.10.9.orig/nspr/pr/include/md/_linux.cfg nspr-4.10.9/nspr/pr/include/md/_linux.cfg
|
Index: b/nspr/pr/include/md/_linux.cfg
|
||||||
--- nspr-4.10.9.orig/nspr/pr/include/md/_linux.cfg 2015-10-03 08:11:43.229387215 -0300
|
===================================================================
|
||||||
+++ nspr-4.10.9/nspr/pr/include/md/_linux.cfg 2015-10-03 08:11:55.277798841 -0300
|
--- a/nspr/pr/include/md/_linux.cfg
|
||||||
|
+++ b/nspr/pr/include/md/_linux.cfg
|
||||||
@@ -1017,6 +1017,51 @@
|
@@ -1017,6 +1017,51 @@
|
||||||
#define PR_BYTES_PER_WORD_LOG2 2
|
#define PR_BYTES_PER_WORD_LOG2 2
|
||||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||||
|
|
||||||
+#elif defined(nios2)
|
+#elif defined(__nios2__)
|
||||||
+
|
+
|
||||||
+#define IS_LITTLE_ENDIAN 1
|
+#define IS_LITTLE_ENDIAN 1
|
||||||
+#undef IS_BIG_ENDIAN
|
+#undef IS_BIG_ENDIAN
|
||||||
@@ -58,14 +59,15 @@ diff -Nura nspr-4.10.9.orig/nspr/pr/include/md/_linux.cfg nspr-4.10.9/nspr/pr/in
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
#error "Unknown CPU architecture"
|
#error "Unknown CPU architecture"
|
||||||
diff -Nura nspr-4.10.9.orig/nspr/pr/include/md/_linux.h nspr-4.10.9/nspr/pr/include/md/_linux.h
|
Index: b/nspr/pr/include/md/_linux.h
|
||||||
--- nspr-4.10.9.orig/nspr/pr/include/md/_linux.h 2015-10-03 08:11:43.229387215 -0300
|
===================================================================
|
||||||
+++ nspr-4.10.9/nspr/pr/include/md/_linux.h 2015-10-03 08:12:22.474728003 -0300
|
--- a/nspr/pr/include/md/_linux.h
|
||||||
|
+++ b/nspr/pr/include/md/_linux.h
|
||||||
@@ -57,6 +57,8 @@
|
@@ -57,6 +57,8 @@
|
||||||
#define _PR_SI_ARCHITECTURE "m32r"
|
#define _PR_SI_ARCHITECTURE "m32r"
|
||||||
#elif defined(__or1k__)
|
#elif defined(__or1k__)
|
||||||
#define _PR_SI_ARCHITECTURE "or1k"
|
#define _PR_SI_ARCHITECTURE "or1k"
|
||||||
+#elif defined(nios2)
|
+#elif defined(__nios2__)
|
||||||
+#define _PR_SI_ARCHITECTURE "nios2"
|
+#define _PR_SI_ARCHITECTURE "nios2"
|
||||||
#else
|
#else
|
||||||
#error "Unknown CPU architecture"
|
#error "Unknown CPU architecture"
|
||||||
|
|||||||
@@ -74,6 +74,6 @@ Index: b/nspr/pr/include/md/_linux.h
|
|||||||
#define _PR_SI_ARCHITECTURE "or1k"
|
#define _PR_SI_ARCHITECTURE "or1k"
|
||||||
+#elif defined(__microblaze__)
|
+#elif defined(__microblaze__)
|
||||||
+#define _PR_SI_ARCHITECTURE "microblaze"
|
+#define _PR_SI_ARCHITECTURE "microblaze"
|
||||||
#elif defined(nios2)
|
#elif defined(__nios2__)
|
||||||
#define _PR_SI_ARCHITECTURE "nios2"
|
#define _PR_SI_ARCHITECTURE "nios2"
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user