Skip to contentSkip to conversation

libnss: Enable for MIPS64 n32 platforms

PATCH New Vicente Olivert Riera 3 participants 6 messages May 22, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libnss: Enable for MIPS64 n32 platforms

After talking with upstream we concluded that MIPS64 n32 is treated as a 32-bit architecture by libnss because it has 32-bit pointers, so USE_64=1 should not be set in that case.

Upstream bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1010730

WRT:
http://git.buildroot.net/buildroot/commit/?id=73e6ae0fe6a69f88183ae33401f2314088b5f799

---
 package/libnss/Config.in |    1 -
 package/libnss/libnss.mk |    2 +-
 2 files changed, 1 insertions(+), 2 deletions(-)
package/libnss/Config.in +0 -1
index 9a1668c..0401a67 100644
@@ -6,7 +6,6 @@ config BR2_PACKAGE_LIBNSS
 	depends on BR2_LARGEFILE
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libnspr
 	depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT # libnspr
-	depends on !BR2_MIPS_NABI32
 	help
 	  Network Security Services (NSS) is a set of libraries designed
 	  to support development of security-enabled client and server
package/libnss/libnss.mk +1 -1
index 666df74..b07cb6f 100644
@@ -29,7 +29,7 @@ LIBNSS_BUILD_VARS = MOZILLA_CLIENT=1 \
 		OS_RELEASE="2.6" \
 		OS_TEST="$(ARCH)"
 
-ifeq ($(BR2_ARCH_IS_64),y)
+ifeq ($(BR2_ARCH_IS_64)$(BR2_MIPS_NABI32),yn)
 LIBNSS_BUILD_VARS += USE_64=1
 endif
 
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 libnss: Enable for MIPS64 n32 platforms

Hi Vicente,

Quoted 21 lines · Vicente Olivert Riera

After talking with upstream we concluded that MIPS64 n32 is treated as a 32-bit architecture by libnss because it has 32-bit pointers, so USE_64=1 should not be set in that case.

Upstream bug:

   https://bugzilla.mozilla.org/show_bug.cgi?id=1010730

WRT:

   http://git.buildroot.net/buildroot/commit/?id=73e6ae0fe6a69f88183ae33401f2314088b5f799
---
 package/libnss/Config.in |    1 -
 package/libnss/libnss.mk |    2 +-
 2 files changed, 1 insertions(+), 2 deletions(-)
package/libnss/Config.in +0 -0
index 9a1668c..0401a67 100644

package/libnss/Config.in config BR2_PACKAGE_LIBNSS · line 9

Quoted 4 lines
package/libnss/Config.in +0 -1
@@ -6,7 +6,6 @@ config BR2_PACKAGE_LIBNSS
 	depends on BR2_LARGEFILE
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libnspr
 	depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT # libnspr
-	depends on !BR2_MIPS_NABI32

Please update the comment dependency accordingly.

baruch

Quoted 15 lines
package/libnss/Config.in +0 -0
 	help
 	  Network Security Services (NSS) is a set of libraries designed
 	  to support development of security-enabled client and server
package/libnss/libnss.mk +1 -1
index 666df74..b07cb6f 100644
@@ -29,7 +29,7 @@ LIBNSS_BUILD_VARS = MOZILLA_CLIENT=1 \
 		OS_RELEASE="2.6" \
 		OS_TEST="$(ARCH)"
 
-ifeq ($(BR2_ARCH_IS_64),y)
+ifeq ($(BR2_ARCH_IS_64)$(BR2_MIPS_NABI32),yn)
 LIBNSS_BUILD_VARS += USE_64=1
 endif
Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#2 lore raw

PATCH 1/1 libnss: Enable for MIPS64 n32 platforms

In reply to Vicente Olivert Riera

Dear Vicente Olivert Riera,

package/libnss/libnss.mk LIBNSS_BUILD_VARS = MOZILLA_CLIENT=1 \ · line 32

Quoted 2 lines · Vicente Olivert Riera
package/libnss/libnss.mk +1 -1
-ifeq ($(BR2_ARCH_IS_64),y)
+ifeq ($(BR2_ARCH_IS_64)$(BR2_MIPS_NABI32),yn)

This cannot work: when an option is disabled, its value is empty, not 'n'.

So:

# a comment here that explains the exception for MIPS_NABI32
ifeq ($(BR2_ARCH_IS_64),y)
ifeq ($(BR2_MIPS_NABI32),)
...
endif
endif

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 1/1 libnss: Enable for MIPS64 n32 platforms

Quoted 19 lines · Thomas Petazzoni

Dear Vicente Olivert Riera,

package/libnss/libnss.mk LIBNSS_BUILD_VARS = MOZILLA_CLIENT=1 \ · line 32

Quoted 2 lines · Vicente Olivert Riera
package/libnss/libnss.mk +1 -1
-ifeq ($(BR2_ARCH_IS_64),y)
+ifeq ($(BR2_ARCH_IS_64)$(BR2_MIPS_NABI32),yn)

This cannot work: when an option is disabled, its value is empty, not 'n'.

So:

# a comment here that explains the exception for MIPS_NABI32
ifeq ($(BR2_ARCH_IS_64),y)
ifeq ($(BR2_MIPS_NABI32),)
...
endif
endif
Quoted 4 lines

Thanks!

Thomas

I tried it and it worked.

Signature · 1 line
Vincent
#4 lore raw

PATCH 1/1 libnss: Enable for MIPS64 n32 platforms

Dear Vicente Olivert Riera,

Quoted 15 lines · Vicente Olivert Riera
Quoted 15 lines

package/libnss/libnss.mk LIBNSS_BUILD_VARS = MOZILLA_CLIENT=1 \ · line 32

Quoted 2 lines
package/libnss/libnss.mk +1 -1
-ifeq ($(BR2_ARCH_IS_64),y)
+ifeq ($(BR2_ARCH_IS_64)$(BR2_MIPS_NABI32),yn)

This cannot work: when an option is disabled, its value is empty, not 'n'.

So:

# a comment here that explains the exception for MIPS_NABI32
ifeq ($(BR2_ARCH_IS_64),y)
ifeq ($(BR2_MIPS_NABI32),)
...
endif
endif
Quoted 6 lines
Quoted 4 lines

Thanks!

Thomas

I tried it and it worked.

Yes, it worked in your case, because the condition had to be false in your case. But with your implementation, the condition will *always* be false, so the USE_64 thing will no longer be passed for BR2_ARCH_IS_64 situations that are *not* BR2_MIPS_NABI32.

Thomsa

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH 1/1 libnss: Enable for MIPS64 n32 platforms

Quoted 24 lines · Thomas Petazzoni

Dear Vicente Olivert Riera,

Quoted 20 lines · Vicente Olivert Riera
Quoted 19 lines

package/libnss/libnss.mk LIBNSS_BUILD_VARS = MOZILLA_CLIENT=1 \ · line 32

Quoted 2 lines
package/libnss/libnss.mk +1 -1
-ifeq ($(BR2_ARCH_IS_64),y)
+ifeq ($(BR2_ARCH_IS_64)$(BR2_MIPS_NABI32),yn)

This cannot work: when an option is disabled, its value is empty, not 'n'.

So:

# a comment here that explains the exception for MIPS_NABI32
ifeq ($(BR2_ARCH_IS_64),y)
ifeq ($(BR2_MIPS_NABI32),)
...
endif
endif

Thanks!

Thomas

Quoted 9 lines
Quoted 1 line

I tried it and it worked.

Yes, it worked in your case, because the condition had to be false in your case. But with your implementation, the condition will *always* be false, so the USE_64 thing will no longer be passed for BR2_ARCH_IS_64 situations that are *not* BR2_MIPS_NABI32.

Thomsa

Ok, understood.

The v2 patch was already sent and it has all the changes you and Baruch suggested.

Signature · 1 line
Vincent