9a521546ed
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>
75 lines
2.0 KiB
Diff
75 lines
2.0 KiB
Diff
Add Nios-II support
|
|
|
|
[Gustavo: update for nspr 4.10.9]
|
|
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
|
|
|
|
Index: b/nspr/pr/include/md/_linux.cfg
|
|
===================================================================
|
|
--- a/nspr/pr/include/md/_linux.cfg
|
|
+++ b/nspr/pr/include/md/_linux.cfg
|
|
@@ -1017,6 +1017,51 @@
|
|
#define PR_BYTES_PER_WORD_LOG2 2
|
|
#define PR_BYTES_PER_DWORD_LOG2 3
|
|
|
|
+#elif defined(__nios2__)
|
|
+
|
|
+#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"
|
|
Index: b/nspr/pr/include/md/_linux.h
|
|
===================================================================
|
|
--- a/nspr/pr/include/md/_linux.h
|
|
+++ b/nspr/pr/include/md/_linux.h
|
|
@@ -57,6 +57,8 @@
|
|
#define _PR_SI_ARCHITECTURE "m32r"
|
|
#elif defined(__or1k__)
|
|
#define _PR_SI_ARCHITECTURE "or1k"
|
|
+#elif defined(__nios2__)
|
|
+#define _PR_SI_ARCHITECTURE "nios2"
|
|
#else
|
|
#error "Unknown CPU architecture"
|
|
#endif
|