commit
48a23a3c81
@ -1,38 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User Makoto Kato <m_kato@ga2.so-net.ne.jp>
|
|
||||||
# Date 1549579831 25200
|
|
||||||
# Thu Feb 07 15:50:31 2019 -0700
|
|
||||||
# Node ID 753fe0f7964c3faef5e4410ed7e0c965df7b180b
|
|
||||||
# Parent 5f4fed68d661de81638c8e1f108aff075a33d46e
|
|
||||||
diff --git a/pr/include/prbit.h b/pr/include/prbit.h
|
|
||||||
--- a/nspr/pr/include/prbit.h
|
|
||||||
+++ b/nspr/pr/include/prbit.h
|
|
||||||
@@ -14,7 +14,8 @@
|
|
||||||
** functions.
|
|
||||||
*/
|
|
||||||
#if defined(_WIN32) && (_MSC_VER >= 1300) && \
|
|
||||||
- (defined(_M_IX86) || defined(_M_AMD64) || defined(_M_ARM))
|
|
||||||
+ (defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM) || \
|
|
||||||
+ defined(_M_ARM64))
|
|
||||||
# include <intrin.h>
|
|
||||||
# pragma intrinsic(_BitScanForward,_BitScanReverse)
|
|
||||||
__forceinline static int __prBitScanForward32(unsigned int val)
|
|
||||||
@@ -33,7 +34,8 @@
|
|
||||||
# define pr_bitscan_clz32(val) __prBitScanReverse32(val)
|
|
||||||
# define PR_HAVE_BUILTIN_BITSCAN32
|
|
||||||
#elif ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) && \
|
|
||||||
- (defined(__i386__) || defined(__x86_64__) || defined(__arm__))
|
|
||||||
+ (defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
|
|
||||||
+ defined(__aarch64__))
|
|
||||||
# define pr_bitscan_ctz32(val) __builtin_ctz(val)
|
|
||||||
# define pr_bitscan_clz32(val) __builtin_clz(val)
|
|
||||||
# define PR_HAVE_BUILTIN_BITSCAN32
|
|
||||||
@@ -136,7 +138,7 @@
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64) || \
|
|
||||||
- defined(_M_X64) || defined(_M_ARM))
|
|
||||||
+ defined(_M_X64) || defined(_M_ARM) || defined(_M_ARM64))
|
|
||||||
#include <stdlib.h>
|
|
||||||
#pragma intrinsic(_rotl, _rotr)
|
|
||||||
#define PR_ROTATE_LEFT32(a, bits) _rotl(a, bits)
|
|
||||||
BIN
nspr-4.20.tar.gz
BIN
nspr-4.20.tar.gz
Binary file not shown.
BIN
nspr-4.26.tar.gz
Normal file
BIN
nspr-4.26.tar.gz
Normal file
Binary file not shown.
77
nspr-gcc-atomics.patch
Normal file
77
nspr-gcc-atomics.patch
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
diff --git a/nspr/pr/include/md/_linux.h b/nspr/pr/include/md/_linux.h
|
||||||
|
--- a/nspr/pr/include/md/_linux.h
|
||||||
|
+++ b/nspr/pr/include/md/_linux.h
|
||||||
|
@@ -96,53 +96,73 @@
|
||||||
|
#define NO_DLOPEN_NULL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__FreeBSD_kernel__) || defined(__GNU__)
|
||||||
|
#define _PR_HAVE_SOCKADDR_LEN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__i386__)
|
||||||
|
+#if defined(__GNUC__)
|
||||||
|
+/* Use GCC built-in functions */
|
||||||
|
+#define _PR_HAVE_ATOMIC_OPS
|
||||||
|
+#define _MD_INIT_ATOMIC()
|
||||||
|
+#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1)
|
||||||
|
+#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1)
|
||||||
|
+#define _MD_ATOMIC_ADD(ptr, i) __sync_add_and_fetch(ptr, i)
|
||||||
|
+#define _MD_ATOMIC_SET(ptr, nv) __sync_lock_test_and_set(ptr, nv)
|
||||||
|
+#else
|
||||||
|
#define _PR_HAVE_ATOMIC_OPS
|
||||||
|
#define _MD_INIT_ATOMIC()
|
||||||
|
extern PRInt32 _PR_x86_AtomicIncrement(PRInt32 *val);
|
||||||
|
#define _MD_ATOMIC_INCREMENT _PR_x86_AtomicIncrement
|
||||||
|
extern PRInt32 _PR_x86_AtomicDecrement(PRInt32 *val);
|
||||||
|
#define _MD_ATOMIC_DECREMENT _PR_x86_AtomicDecrement
|
||||||
|
extern PRInt32 _PR_x86_AtomicAdd(PRInt32 *ptr, PRInt32 val);
|
||||||
|
#define _MD_ATOMIC_ADD _PR_x86_AtomicAdd
|
||||||
|
extern PRInt32 _PR_x86_AtomicSet(PRInt32 *val, PRInt32 newval);
|
||||||
|
#define _MD_ATOMIC_SET _PR_x86_AtomicSet
|
||||||
|
#endif
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#if defined(__ia64__)
|
||||||
|
#define _PR_HAVE_ATOMIC_OPS
|
||||||
|
#define _MD_INIT_ATOMIC()
|
||||||
|
extern PRInt32 _PR_ia64_AtomicIncrement(PRInt32 *val);
|
||||||
|
#define _MD_ATOMIC_INCREMENT _PR_ia64_AtomicIncrement
|
||||||
|
extern PRInt32 _PR_ia64_AtomicDecrement(PRInt32 *val);
|
||||||
|
#define _MD_ATOMIC_DECREMENT _PR_ia64_AtomicDecrement
|
||||||
|
extern PRInt32 _PR_ia64_AtomicAdd(PRInt32 *ptr, PRInt32 val);
|
||||||
|
#define _MD_ATOMIC_ADD _PR_ia64_AtomicAdd
|
||||||
|
extern PRInt32 _PR_ia64_AtomicSet(PRInt32 *val, PRInt32 newval);
|
||||||
|
#define _MD_ATOMIC_SET _PR_ia64_AtomicSet
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__x86_64__)
|
||||||
|
+#if defined(__GNUC__)
|
||||||
|
+/* Use GCC built-in functions */
|
||||||
|
+#define _PR_HAVE_ATOMIC_OPS
|
||||||
|
+#define _MD_INIT_ATOMIC()
|
||||||
|
+#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1)
|
||||||
|
+#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1)
|
||||||
|
+#define _MD_ATOMIC_ADD(ptr, i) __sync_add_and_fetch(ptr, i)
|
||||||
|
+#define _MD_ATOMIC_SET(ptr, nv) __sync_lock_test_and_set(ptr, nv)
|
||||||
|
+#else
|
||||||
|
#define _PR_HAVE_ATOMIC_OPS
|
||||||
|
#define _MD_INIT_ATOMIC()
|
||||||
|
extern PRInt32 _PR_x86_64_AtomicIncrement(PRInt32 *val);
|
||||||
|
#define _MD_ATOMIC_INCREMENT _PR_x86_64_AtomicIncrement
|
||||||
|
extern PRInt32 _PR_x86_64_AtomicDecrement(PRInt32 *val);
|
||||||
|
#define _MD_ATOMIC_DECREMENT _PR_x86_64_AtomicDecrement
|
||||||
|
extern PRInt32 _PR_x86_64_AtomicAdd(PRInt32 *ptr, PRInt32 val);
|
||||||
|
#define _MD_ATOMIC_ADD _PR_x86_64_AtomicAdd
|
||||||
|
extern PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval);
|
||||||
|
#define _MD_ATOMIC_SET _PR_x86_64_AtomicSet
|
||||||
|
#endif
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#if defined(__or1k__)
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
/* Use GCC built-in functions */
|
||||||
|
#define _PR_HAVE_ATOMIC_OPS
|
||||||
|
#define _MD_INIT_ATOMIC()
|
||||||
|
#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1)
|
||||||
|
#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1)
|
||||||
13
nspr.spec
13
nspr.spec
@ -1,15 +1,15 @@
|
|||||||
%global nspr_version 4.20
|
%global nspr_version 4.26
|
||||||
Name: nspr
|
Name: nspr
|
||||||
Version: 4.20.0
|
Version: 4.26.0
|
||||||
Release: 4
|
Release: 1
|
||||||
Summary: Netscape Portable Runtime
|
Summary: Netscape Portable Runtime
|
||||||
License: MPLv2.0
|
License: MPLv2.0
|
||||||
URL: http://www.mozilla.org/projects/nspr
|
URL: http://www.mozilla.org/projects/nspr
|
||||||
BuildRequires: gcc git
|
BuildRequires: gcc git
|
||||||
Source0: %{name}-%{nspr_version}.tar.gz
|
Source0: https://ftp.mozilla.org/pub/%{name}/releases/v%{version}/src/%{name}-%{version}.tar.gz
|
||||||
Source1: nspr-config.xml
|
Source1: nspr-config.xml
|
||||||
|
|
||||||
Patch6000: 6000-Bug-1525173-prbith-should-use-builtin-function-on-aarch64.patch
|
Patch1: nspr-gcc-atomics.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
NetScape Portable Runtime (NSPR) provides platform independence for non-GUI
|
NetScape Portable Runtime (NSPR) provides platform independence for non-GUI
|
||||||
@ -83,6 +83,9 @@ install -c -m 644 nspr-config.1 $RPM_BUILD_ROOT%{_mandir}/man1/nspr-config.1
|
|||||||
%{_mandir}/man*/*
|
%{_mandir}/man*/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jul 17 2020 jinzhimin <jinzhimin2@huawei.com> - 4.26.0-1
|
||||||
|
- upgrade to 4.26.0
|
||||||
|
|
||||||
* Wed Jan 8 2020 hewenliang <hewenliang4@huawei.com> - 4.20.0-4
|
* Wed Jan 8 2020 hewenliang <hewenliang4@huawei.com> - 4.20.0-4
|
||||||
- Remove unecessary patches.
|
- Remove unecessary patches.
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user