Skip to contentSkip to conversation

NSPR cleanup

PATCH New Giulio Benetti 2 participants 7 messages Dec 27, 2019 – Jan 16, 2020

lore
Share & tools
lore
#0 lore raw

cover NSPR cleanup

This patchset makes libnspr available for every architecture, before Xtensa and Arc architectures were not supported. By doing this we can then remove additional check in Config.in files with
'depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT' that becomes useless.

Giulio Benetti (3):
package/libnspr: allow building for Arc Architecture package/libnspr: enable building with xtensa package/libnspr: remove BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT

 package/ecryptfs-utils/Config.in              |  2 --
 ...6092_Add_support_for_building_xtensa.patch | 33 +++++++++++++++++++
 package/libnspr/Config.in                     |  8 -----
 package/libnss/Config.in                      |  2 --
 package/spidermonkey/Config.in                |  1 -
 5 files changed, 33 insertions(+), 13 deletions(-)
 create mode 100644 package/libnspr/0001-Bug_1606092_Add_support_for_building_xtensa.patch
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/3 package/libnspr: allow building for Arc Architecture

Arc architecture is now supported by NSPR so let's allow to build for it.

---
 package/libnspr/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/libnspr/Config.in +1 -1
index 1d95155248..57fcbdf6be 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT
 	def_bool y
-	depends on !BR2_arc && !BR2_xtensa
+	depends on !BR2_xtensa
 
 if BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT
 
Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/3 package/libnspr: enable building with xtensa

In reply to Giulio Benetti

Add patch to support Xtensa architecture building.

---
Patch pending upstream:
https://bugzilla.mozilla.org/show_bug.cgi?id=1606092

---
 ...6092_Add_support_for_building_xtensa.patch | 33 +++++++++++++++++++
 package/libnspr/Config.in                     |  1 -
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 package/libnspr/0001-Bug_1606092_Add_support_for_building_xtensa.patch
package/libnspr/0001-Bug_1606092_Add_support_for_building_xtensa.patch new file +33 -0
new file mode 100644
index 0000000000..73a70277b6
@@ -0,0 +1,33 @@
+# HG changeset patch
+# User Giulio Benetti <[email protected]>
+# Date 1577456724 -3600
+#      Fri Dec 27 15:25:24 2019 +0100
+# Node ID 1a3d96917971ea13432116f41ace8a9e19ef7f97
+# Parent  b9c2a7602ab0a1c0c890db6cf4c3b1f1e6e243c1
+Bug 1606092 - Add support for building Xtensa
+
+diff -r b9c2a7602ab0 -r 1a3d96917971 nspr/pr/include/md/_linux.cfg
+--- a/nspr/pr/include/md/_linux.cfg	Mon Dec 02 19:24:25 2019 +0100
++++ b/nspr/pr/include/md/_linux.cfg	Fri Dec 27 15:25:24 2019 +0100
+@@ -1157,7 +1157,8 @@
+ #define PR_BYTES_PER_WORD_LOG2   2
+ #define PR_BYTES_PER_DWORD_LOG2  3
+ 
+-#elif defined(__nios2__) || defined(__microblaze__) || defined(__nds32__)
++#elif defined(__nios2__) || defined(__microblaze__) || defined(__nds32__) || \
++      defined(__xtensa__)
+ 
+ #if defined(__microblaze__) && defined(__BIG_ENDIAN__)
+ #define IS_BIG_ENDIAN 1
+diff -r b9c2a7602ab0 -r 1a3d96917971 nspr/pr/include/md/_linux.h
+--- a/nspr/pr/include/md/_linux.h	Mon Dec 02 19:24:25 2019 +0100
++++ b/nspr/pr/include/md/_linux.h	Fri Dec 27 15:25:24 2019 +0100
+@@ -69,6 +69,8 @@
+ #define _PR_SI_ARCHITECTURE "microblaze"
+ #elif defined(__nds32__)
+ #define _PR_SI_ARCHITECTURE "nds32"
++#elif defined(__xtensa__)
++#define _PR_SI_ARCHITECTURE "xtensa"
+ #else
+ #error "Unknown CPU architecture"
+ #endif
package/libnspr/Config.in +0 -1
index 57fcbdf6be..c1be7151e0 100644
@@ -1,6 +1,5 @@
 config BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT
 	def_bool y
-	depends on !BR2_xtensa
 
 if BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT
 
Signature · 1 line
2.20.1
#3 lore raw

PATCH 3/3 package/libnspr: remove BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT

In reply to Giulio Benetti

Since all architectures supported by Buildroot are supported by libnspr BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT makes no sense anymore, so let's remove it all around.

---
 package/ecryptfs-utils/Config.in | 2 --
 package/libnspr/Config.in        | 7 -------
 package/libnss/Config.in         | 2 --
 package/spidermonkey/Config.in   | 1 -
 4 files changed, 12 deletions(-)
package/ecryptfs-utils/Config.in +0 -2
index 0c39f48d08..08210f05eb 100644
@@ -3,7 +3,6 @@ config BR2_PACKAGE_ECRYPTFS_UTILS
 	depends on BR2_USE_WCHAR # gettext
 	depends on BR2_USE_MMU # keyutils
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libnss -> libnspr
-	depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT # libnss -> libnspr
 	depends on !BR2_MIPS_NABI32 # libnss
 	depends on !BR2_STATIC_LIBS # libnss, keyutils
 	select BR2_PACKAGE_KEYUTILS
@@ -29,7 +28,6 @@ config BR2_PACKAGE_ECRYPTFS_UTILS
 	  http://ecryptfs.org
 
 comment "ecryptfs-utils needs a toolchain w/ threads, wchar, dynamic library"
-	depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT
 	depends on BR2_USE_MMU
 	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \
 		BR2_STATIC_LIBS
package/libnspr/Config.in +0 -7
index c1be7151e0..de8dd0a06b 100644
@@ -1,8 +1,3 @@
-config BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT
-	def_bool y
-
-if BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT
-
 config BR2_PACKAGE_LIBNSPR
 	bool "libnspr"
 	depends on BR2_TOOLCHAIN_HAS_THREADS
@@ -17,5 +12,3 @@ config BR2_PACKAGE_LIBNSPR
 
 comment "libnspr needs a toolchain w/ threads, dynamic library"
 	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
-
-endif
package/libnss/Config.in +0 -2
index 599c9a6536..90bf75f476 100644
@@ -1,7 +1,6 @@
 config BR2_PACKAGE_LIBNSS
 	bool "libnss"
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libnspr
-	depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT # libnspr
 	depends on !BR2_STATIC_LIBS
 	select BR2_PACKAGE_LIBNSPR
 	select BR2_PACKAGE_SQLITE
@@ -16,5 +15,4 @@ config BR2_PACKAGE_LIBNSS
 	  http://www.mozilla.org/projects/security/pki/nss/
 
 comment "libnss needs a toolchain w/ threads, dynamic library"
-	depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT
 	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
package/spidermonkey/Config.in +0 -1
index 5f12110626..150b941c94 100644
@@ -8,7 +8,6 @@ config BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS
 	default y if BR2_riscv
 	default y if BR2_sh4 || BR2_sh4a
 	default y if BR2_sparc || BR2_sparc64
-	depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT # libnspr
 
 config BR2_PACKAGE_SPIDERMONKEY_JIT_ARCH_SUPPORTS
 	bool
Signature · 1 line
2.20.1
#4 lore raw

cover NSPR cleanup

In reply to Giulio Benetti

Giulio, All,

On 2019-12-27 15:43 +0100, Giulio Benetti spake thusly:

Quoted 7 lines

This patchset makes libnspr available for every architecture, before Xtensa and Arc architectures were not supported. By doing this we can then remove additional check in Config.in files with
'depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT' that becomes useless.

Giulio Benetti (3):
package/libnspr: allow building for Arc Architecture

I've applied that one...

Quoted 2 lines

package/libnspr: enable building with xtensa package/libnspr: remove BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT

.. but those two ones are a feature patch. Let's at least wait for upstream to reply/apply it before we can carry it. As such, I've marked them as "Awaiting Upstream" (which is basically equivalanet to a reject, sorry).

Regards,
Yann E. MORIN.

Quoted 16 lines
 package/ecryptfs-utils/Config.in              |  2 --
 ...6092_Add_support_for_building_xtensa.patch | 33 +++++++++++++++++++
 package/libnspr/Config.in                     |  8 -----
 package/libnss/Config.in                      |  2 --
 package/spidermonkey/Config.in                |  1 -
 5 files changed, 33 insertions(+), 13 deletions(-)
 create mode 100644 package/libnspr/0001-Bug_1606092_Add_support_for_building_xtensa.patch
Signature · 6 lines
2.20.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

cover NSPR cleanup

Hi Yann, All,

Quoted 13 lines · Yann E. MORIN

Giulio, All,

On 2019-12-27 15:43 +0100, Giulio Benetti spake thusly:

Quoted 7 lines

This patchset makes libnspr available for every architecture, before Xtensa and Arc architectures were not supported. By doing this we can then remove additional check in Config.in files with
'depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT' that becomes useless.

Giulio Benetti (3):
package/libnspr: allow building for Arc Architecture

I've applied that one...

Quoted 7 lines
Quoted 2 lines

package/libnspr: enable building with xtensa package/libnspr: remove BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT

.. but those two ones are a feature patch. Let's at least wait for upstream to reply/apply it before we can carry it. As such, I've marked them as "Awaiting Upstream" (which is basically equivalanet to a reject, sorry).

Patch: "package/libnspr: enable building with xtensa" contains a patch that is equal to previous patch I've already upstream to support microblaze, nios-II and nds32. So Xtensa should do nothing different from those 3 architectures and endianness is taken into account too. So if upstream already trusted it:
https://bugzilla.mozilla.org/show_bug.cgi?id=1578363
they should trust the same this new one.

Thanks for reviewing and
Kind regards

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas
Quoted 20 lines

Regards,
Yann E. MORIN.

Quoted 16 lines
  package/ecryptfs-utils/Config.in              |  2 --
  ...6092_Add_support_for_building_xtensa.patch | 33 +++++++++++++++++++
  package/libnspr/Config.in                     |  8 -----
  package/libnss/Config.in                      |  2 --
  package/spidermonkey/Config.in                |  1 -
  5 files changed, 33 insertions(+), 13 deletions(-)

create mode 100644 package/libnspr/0001-Bug_1606092_Add_support_for_building_xtensa.patch

Signature · 6 lines
2.20.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
#6 lore raw

cover NSPR cleanup

In reply to Yann E. MORIN

Hi Yann,

Quoted 13 lines · Yann E. MORIN

Giulio, All,

On 2019-12-27 15:43 +0100, Giulio Benetti spake thusly:

Quoted 7 lines

This patchset makes libnspr available for every architecture, before Xtensa and Arc architectures were not supported. By doing this we can then remove additional check in Config.in files with
'depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT' that becomes useless.

Giulio Benetti (3):
package/libnspr: allow building for Arc Architecture

I've applied that one...

Quoted 7 lines
Quoted 2 lines

package/libnspr: enable building with xtensa package/libnspr: remove BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT

.. but those two ones are a feature patch. Let's at least wait for upstream to reply/apply it before we can carry it. As such, I've marked them as "Awaiting Upstream" (which is basically equivalanet to a reject, sorry).

Patch contained in "package/libnspr: enable building with xtensa" has been upstreamed:
https://bugzilla.mozilla.org/show_bug.cgi?id=1606092
https://hg.mozilla.org/projects/nspr/rev/ef5d8d008815e8367e684149f88b43f5ae53e1d7

Best regards

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas
Quoted 20 lines

Regards,
Yann E. MORIN.

Quoted 16 lines
  package/ecryptfs-utils/Config.in              |  2 --
  ...6092_Add_support_for_building_xtensa.patch | 33 +++++++++++++++++++
  package/libnspr/Config.in                     |  8 -----
  package/libnss/Config.in                      |  2 --
  package/spidermonkey/Config.in                |  1 -
  5 files changed, 33 insertions(+), 13 deletions(-)

create mode 100644 package/libnspr/0001-Bug_1606092_Add_support_for_building_xtensa.patch

Signature · 6 lines
2.20.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 2 lines
Giulio Benetti
Benetti Engineering sas