python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / libnspr / 0002-microblaze.patch
blobf1416e7e97efac6ffa44fd70de7d353f94e5b6c7
1 Add Microblaze support
3 [Gustavo: update for nspr 4.10.9]
4 Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
6 diff -Nura nspr-4.10.9.orig/nspr/pr/include/md/_linux.cfg nspr-4.10.9/nspr/pr/include/md/_linux.cfg
7 --- nspr-4.10.9.orig/nspr/pr/include/md/_linux.cfg 2015-10-03 08:13:11.845414714 -0300
8 +++ nspr-4.10.9/nspr/pr/include/md/_linux.cfg 2015-10-03 08:13:20.435708195 -0300
9 @@ -1062,6 +1062,56 @@
10 #define PR_BYTES_PER_WORD_LOG2 2
11 #define PR_BYTES_PER_DWORD_LOG2 3
13 +#elif defined(__microblaze__)
15 +#if defined(__BIG_ENDIAN__)
16 +#define IS_BIG_ENDIAN 1
17 +#undef IS_LITTLE_ENDIAN
18 +#else
19 +#define IS_LITTLE_ENDIAN 1
20 +#undef IS_BIG_ENDIAN
21 +#endif
23 +#define PR_BYTES_PER_BYTE 1
24 +#define PR_BYTES_PER_SHORT 2
25 +#define PR_BYTES_PER_INT 4
26 +#define PR_BYTES_PER_INT64 8
27 +#define PR_BYTES_PER_LONG 4
28 +#define PR_BYTES_PER_FLOAT 4
29 +#define PR_BYTES_PER_DOUBLE 8
30 +#define PR_BYTES_PER_WORD 4
31 +#define PR_BYTES_PER_DWORD 8
33 +#define PR_BITS_PER_BYTE 8
34 +#define PR_BITS_PER_SHORT 16
35 +#define PR_BITS_PER_INT 32
36 +#define PR_BITS_PER_INT64 64
37 +#define PR_BITS_PER_LONG 32
38 +#define PR_BITS_PER_FLOAT 32
39 +#define PR_BITS_PER_DOUBLE 64
40 +#define PR_BITS_PER_WORD 32
42 +#define PR_BITS_PER_BYTE_LOG2 3
43 +#define PR_BITS_PER_SHORT_LOG2 4
44 +#define PR_BITS_PER_INT_LOG2 5
45 +#define PR_BITS_PER_INT64_LOG2 6
46 +#define PR_BITS_PER_LONG_LOG2 5
47 +#define PR_BITS_PER_FLOAT_LOG2 5
48 +#define PR_BITS_PER_DOUBLE_LOG2 6
49 +#define PR_BITS_PER_WORD_LOG2 5
51 +#define PR_ALIGN_OF_SHORT 2
52 +#define PR_ALIGN_OF_INT 4
53 +#define PR_ALIGN_OF_LONG 4
54 +#define PR_ALIGN_OF_INT64 4
55 +#define PR_ALIGN_OF_FLOAT 4
56 +#define PR_ALIGN_OF_DOUBLE 4
57 +#define PR_ALIGN_OF_POINTER 4
58 +#define PR_ALIGN_OF_WORD 4
60 +#define PR_BYTES_PER_WORD_LOG2 2
61 +#define PR_BYTES_PER_DWORD_LOG2 3
63 #else
65 #error "Unknown CPU architecture"
66 diff -Nura nspr-4.10.9.orig/nspr/pr/include/md/_linux.h nspr-4.10.9/nspr/pr/include/md/_linux.h
67 --- nspr-4.10.9.orig/nspr/pr/include/md/_linux.h 2015-10-03 08:13:11.845414714 -0300
68 +++ nspr-4.10.9/nspr/pr/include/md/_linux.h 2015-10-03 08:14:53.351882603 -0300
69 @@ -57,8 +57,11 @@
70 #define _PR_SI_ARCHITECTURE "m32r"
71 #elif defined(__or1k__)
72 #define _PR_SI_ARCHITECTURE "or1k"
73 +#elif defined(__microblaze__)
74 +#define _PR_SI_ARCHITECTURE "microblaze"
75 #elif defined(nios2)
76 #define _PR_SI_ARCHITECTURE "nios2"
77 +#elif defined(nios2)
78 #else
79 #error "Unknown CPU architecture"
80 #endif