summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/nspr/nspr
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/nspr/nspr')
-rw-r--r--meta/recipes-support/nspr/nspr/0001-md-Fix-build-with-musl.patch31
-rw-r--r--meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch102
-rw-r--r--meta/recipes-support/nspr/nspr/Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch103
-rw-r--r--meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch52
-rw-r--r--meta/recipes-support/nspr/nspr/nspr.pc.in11
-rw-r--r--meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch26
-rw-r--r--meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch19
7 files changed, 0 insertions, 344 deletions
diff --git a/meta/recipes-support/nspr/nspr/0001-md-Fix-build-with-musl.patch b/meta/recipes-support/nspr/nspr/0001-md-Fix-build-with-musl.patch
deleted file mode 100644
index f3cd670026..0000000000
--- a/meta/recipes-support/nspr/nspr/0001-md-Fix-build-with-musl.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From 147f3c2acbd96d44025cec11800ded0282327764 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 18 Sep 2017 17:22:43 -0700
4Subject: [PATCH] md: Fix build with musl
5
6The MIPS specific header <sgidefs.h> is not provided by musl
7linux kernel headers provide <asm/sgidefs.h> which has same definitions
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11Upstream-Status: Pending
12
13 pr/include/md/_linux.cfg | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/pr/include/md/_linux.cfg b/pr/include/md/_linux.cfg
17index 640b19c..31296a8 100644
18--- a/pr/include/md/_linux.cfg
19+++ b/pr/include/md/_linux.cfg
20@@ -499,7 +499,7 @@
21 #elif defined(__mips__)
22
23 /* For _ABI64 */
24-#include <sgidefs.h>
25+#include <asm/sgidefs.h>
26
27 #ifdef __MIPSEB__
28 #define IS_BIG_ENDIAN 1
29--
302.14.1
31
diff --git a/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch b/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch
deleted file mode 100644
index 3a04d426a8..0000000000
--- a/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch
+++ /dev/null
@@ -1,102 +0,0 @@
1From 95bda64fb4cf1825fea745e918cfe8202843f0ba Mon Sep 17 00:00:00 2001
2From: Marek Vasut <marex@denx.de>
3Date: Sat, 30 Jan 2016 07:18:02 +0100
4Subject: [PATCH] Add nios2 support
5
6Add support for the nios2 CPU.
7
8Signed-off-by: Marek Vasut <marex@denx.de>
9Upstream-Status: Submitted [ https://bugzilla.mozilla.org/show_bug.cgi?id=1244421 ]
10---
11 nspr/pr/include/md/_linux.cfg | 45 +++++++++++++++++++++++++++++++++++++++++++
12 nspr/pr/include/md/_linux.h | 14 ++++++++++++++
13 2 files changed, 59 insertions(+)
14
15Index: nspr/pr/include/md/_linux.cfg
16===================================================================
17--- nspr.orig/pr/include/md/_linux.cfg
18+++ nspr/pr/include/md/_linux.cfg
19@@ -975,6 +975,51 @@
20 #define PR_BYTES_PER_WORD_LOG2 2
21 #define PR_BYTES_PER_DWORD_LOG2 3
22
23+#elif defined(__nios2__)
24+
25+#define IS_LITTLE_ENDIAN 1
26+#undef IS_BIG_ENDIAN
27+
28+#define PR_BYTES_PER_BYTE 1
29+#define PR_BYTES_PER_SHORT 2
30+#define PR_BYTES_PER_INT 4
31+#define PR_BYTES_PER_INT64 8
32+#define PR_BYTES_PER_LONG 4
33+#define PR_BYTES_PER_FLOAT 4
34+#define PR_BYTES_PER_DOUBLE 8
35+#define PR_BYTES_PER_WORD 4
36+#define PR_BYTES_PER_DWORD 8
37+
38+#define PR_BITS_PER_BYTE 8
39+#define PR_BITS_PER_SHORT 16
40+#define PR_BITS_PER_INT 32
41+#define PR_BITS_PER_INT64 64
42+#define PR_BITS_PER_LONG 32
43+#define PR_BITS_PER_FLOAT 32
44+#define PR_BITS_PER_DOUBLE 64
45+#define PR_BITS_PER_WORD 32
46+
47+#define PR_BITS_PER_BYTE_LOG2 3
48+#define PR_BITS_PER_SHORT_LOG2 4
49+#define PR_BITS_PER_INT_LOG2 5
50+#define PR_BITS_PER_INT64_LOG2 6
51+#define PR_BITS_PER_LONG_LOG2 5
52+#define PR_BITS_PER_FLOAT_LOG2 5
53+#define PR_BITS_PER_DOUBLE_LOG2 6
54+#define PR_BITS_PER_WORD_LOG2 5
55+
56+#define PR_ALIGN_OF_SHORT 2
57+#define PR_ALIGN_OF_INT 4
58+#define PR_ALIGN_OF_LONG 4
59+#define PR_ALIGN_OF_INT64 4
60+#define PR_ALIGN_OF_FLOAT 4
61+#define PR_ALIGN_OF_DOUBLE 4
62+#define PR_ALIGN_OF_POINTER 4
63+#define PR_ALIGN_OF_WORD 4
64+
65+#define PR_BYTES_PER_WORD_LOG2 2
66+#define PR_BYTES_PER_DWORD_LOG2 3
67+
68 #elif defined(__or1k__)
69
70 #undef IS_LITTLE_ENDIAN
71Index: nspr/pr/include/md/_linux.h
72===================================================================
73--- nspr.orig/pr/include/md/_linux.h
74+++ nspr/pr/include/md/_linux.h
75@@ -55,6 +55,8 @@
76 #define _PR_SI_ARCHITECTURE "avr32"
77 #elif defined(__m32r__)
78 #define _PR_SI_ARCHITECTURE "m32r"
79+#elif defined(__nios2__)
80+#define _PR_SI_ARCHITECTURE "nios2"
81 #elif defined(__or1k__)
82 #define _PR_SI_ARCHITECTURE "or1k"
83 #elif defined(__riscv) && (__riscv_xlen == 32)
84@@ -129,6 +131,18 @@ extern PRInt32 _PR_x86_64_AtomicSet(PRIn
85 #define _MD_ATOMIC_SET _PR_x86_64_AtomicSet
86 #endif
87
88+#if defined(__nios2__)
89+#if defined(__GNUC__)
90+/* Use GCC built-in functions */
91+#define _PR_HAVE_ATOMIC_OPS
92+#define _MD_INIT_ATOMIC()
93+#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1)
94+#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1)
95+#define _MD_ATOMIC_ADD(ptr, i) __sync_add_and_fetch(ptr, i)
96+#define _MD_ATOMIC_SET(ptr, nv) __sync_lock_test_and_set(ptr, nv)
97+#endif
98+#endif
99+
100 #if defined(__or1k__)
101 #if defined(__GNUC__)
102 /* Use GCC built-in functions */
diff --git a/meta/recipes-support/nspr/nspr/Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch b/meta/recipes-support/nspr/nspr/Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch
deleted file mode 100644
index 90fe45f34d..0000000000
--- a/meta/recipes-support/nspr/nspr/Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch
+++ /dev/null
@@ -1,103 +0,0 @@
1From 8a592e4ead4ed6befe6044da3dd2dc7523c33905 Mon Sep 17 00:00:00 2001
2From: Mingli Yu <Mingli.Yu@windriver.com>
3Date: Fri, 16 Nov 2018 13:52:49 +0800
4Subject: [PATCH] Makefile.in: remove _BUILD_STRING and _BUILD_TIME
5
6Remove _BUILD_STRING and _BUILD_TIME to avoid
7adding timestamp to _pl_bld.h which can result
8in adding timestamp in library file such as
9libnspr4.so.
10 $ readelf --wide --decompress --hex-dump=.rodata libnspr4.so
11 [snip]
12 0x00004000 32303138 2d31312d 31352030 353a3439 2018-11-15 05:49
13 [snip]
14
15Upstream-Status: Pending
16
17Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
18---
19 lib/ds/Makefile.in | 8 +-------
20 lib/libc/src/Makefile.in | 8 +-------
21 lib/prstreams/Makefile.in | 8 +-------
22 pr/src/Makefile.in | 8 +-------
23 4 files changed, 4 insertions(+), 28 deletions(-)
24
25diff --git a/lib/ds/Makefile.in b/lib/ds/Makefile.in
26index e737791..b578476 100644
27--- a/lib/ds/Makefile.in
28+++ b/lib/ds/Makefile.in
29@@ -114,13 +114,7 @@ GARBAGE += $(TINC)
30
31 $(TINC):
32 @$(MAKE_OBJDIR)
33- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
34- @if test ! -z "$(SH_NOW)"; then \
35- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
36- else \
37- true; \
38- fi
39- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
40+ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
41
42
43 $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
44diff --git a/lib/libc/src/Makefile.in b/lib/libc/src/Makefile.in
45index e8a6d9f..978ed28 100644
46--- a/lib/libc/src/Makefile.in
47+++ b/lib/libc/src/Makefile.in
48@@ -116,13 +116,7 @@ GARBAGE += $(TINC)
49
50 $(TINC):
51 @$(MAKE_OBJDIR)
52- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
53- @if test ! -z "$(SH_NOW)"; then \
54- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
55- else \
56- true; \
57- fi
58- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
59+ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
60
61
62 $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
63diff --git a/lib/prstreams/Makefile.in b/lib/prstreams/Makefile.in
64index aeb2944..f318097 100644
65--- a/lib/prstreams/Makefile.in
66+++ b/lib/prstreams/Makefile.in
67@@ -116,13 +116,7 @@ endif
68
69 $(TINC):
70 @$(MAKE_OBJDIR)
71- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
72- @if test ! -z "$(SH_NOW)"; then \
73- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
74- else \
75- true; \
76- fi
77- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
78+ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
79
80
81 $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
82diff --git a/pr/src/Makefile.in b/pr/src/Makefile.in
83index 19c5a69..b4ac31c 100644
84--- a/pr/src/Makefile.in
85+++ b/pr/src/Makefile.in
86@@ -326,13 +326,7 @@ GARBAGE += $(TINC)
87
88 $(TINC):
89 @$(MAKE_OBJDIR)
90- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
91- @if test ! -z "$(SH_NOW)"; then \
92- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
93- else \
94- true; \
95- fi
96- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
97+ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
98
99
100 $(OBJDIR)/prvrsion.$(OBJ_SUFFIX): prvrsion.c $(TINC)
101--
1022.7.4
103
diff --git a/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch b/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch
deleted file mode 100644
index f12acc8548..0000000000
--- a/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1Fix build failure on x86_64
2
3When the target_cpu is x86_64, we should assume that the pkg uses 64bit,
4only if USE_N32 is set, we can assume that the pkg uses 32bit. It used a
5opposite logic before.
6
7Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
8
9Upstream-Status: Pending
10---
11 configure.in | 12 ++++++------
12 1 files changed, 6 insertions(+), 6 deletions(-)
13
14Index: nspr/configure.in
15===================================================================
16--- nspr.orig/configure.in
17+++ nspr/configure.in
18@@ -1875,28 +1875,24 @@ tools are selected during the Xcode/Deve
19 PR_MD_ASFILES=os_Linux_ia64.s
20 ;;
21 x86_64)
22- if test -n "$USE_64"; then
23- PR_MD_ASFILES=os_Linux_x86_64.s
24- elif test -n "$USE_X32"; then
25+ if test -n "$USE_X32"; then
26+ AC_DEFINE(i386)
27 PR_MD_ASFILES=os_Linux_x86_64.s
28 CC="$CC -mx32"
29 CXX="$CXX -mx32"
30 else
31- AC_DEFINE(i386)
32- PR_MD_ASFILES=os_Linux_x86.s
33- CC="$CC -m32"
34- CXX="$CXX -m32"
35+ PR_MD_ASFILES=os_Linux_x86_64.s
36 fi
37 ;;
38 ppc|powerpc)
39 PR_MD_ASFILES=os_Linux_ppc.s
40 ;;
41 powerpc64)
42- if test -n "$USE_64"; then
43+ if test -n "$USE_N32"; then
44+ PR_MD_ASFILES=os_Linux_ppc.s
45+ else
46 CC="$CC -m64"
47 CXX="$CXX -m64"
48- else
49- PR_MD_ASFILES=os_Linux_ppc.s
50 fi
51 ;;
52 esac
diff --git a/meta/recipes-support/nspr/nspr/nspr.pc.in b/meta/recipes-support/nspr/nspr/nspr.pc.in
deleted file mode 100644
index 1f15d19cfa..0000000000
--- a/meta/recipes-support/nspr/nspr/nspr.pc.in
+++ /dev/null
@@ -1,11 +0,0 @@
1os_libs=-lpthread -ldl
2prefix=OEPREFIX
3exec_prefix=OEEXECPREFIX
4libdir=OELIBDIR
5includedir=OEINCDIR
6
7Name: NSPR
8Description: The Netscape Portable Runtime
9Version: NSPRVERSION
10Libs: -L${libdir} -lplds4 -lplc4 -lnspr4 -lpthread -ldl
11Cflags: -I${includedir}/nspr
diff --git a/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch b/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch
deleted file mode 100644
index 7ba59ed644..0000000000
--- a/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1Author: Andrei Gherzan <andrei@gherzan.ro>
2Date: Thu Feb 9 00:03:38 2012 +0200
3
4Avoid QA warnings by removing hardcoded rpath from binaries.
5
6[...]
7WARNING: QA Issue: package nspr contains bad RPATH {builddir}/tmp/work/armv5te-poky-linux-gnueabi/nspr-4.8.9-r1/nspr-4.8.9/mozilla/nsprpub/pr/tests/../../dist/lib
8in file {builddir}/tmp/work/armv5te-poky-linux-gnueabi/nspr-4.8.9-r1/packages-split/nspr/usr/lib/nspr/tests/multiwait
9[...]
10
11Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
12Upstream-Status: Pending
13
14Index: nspr/pr/tests/Makefile.in
15===================================================================
16--- nspr.orig/pr/tests/Makefile.in
17+++ nspr/pr/tests/Makefile.in
18@@ -316,7 +316,7 @@ ifeq ($(OS_ARCH), SunOS)
19 endif # SunOS
20
21 ifeq (,$(filter-out Linux GNU GNU_%,$(OS_ARCH)))
22- LDOPTS += -Xlinker -rpath $(ABSOLUTE_LIB_DIR)
23+ LDOPTS += -Xlinker
24 ifeq ($(USE_PTHREADS),1)
25 EXTRA_LIBS = -lpthread
26 endif
diff --git a/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch b/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch
deleted file mode 100644
index bde715c5dc..0000000000
--- a/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch
+++ /dev/null
@@ -1,19 +0,0 @@
1the $srcdir is not defined at the time of gnu-configurize.
2
3Upstream-Status: Inappropriate [OE-Core specific]
4
5Signed-off-by: Saul Wold <sgw@linux.intel.com>
6
7Index: nspr/configure.in
8===================================================================
9--- nspr.orig/configure.in
10+++ nspr/configure.in
11@@ -8,7 +8,7 @@ AC_PREREQ(2.61)
12 AC_INIT
13 AC_CONFIG_SRCDIR([pr/include/nspr.h])
14
15-AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
16+AC_CONFIG_AUX_DIR(build/autoconf)
17 AC_CANONICAL_TARGET
18
19 dnl ========================================================