Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] nss: Fix build on mips/clang
@ 2016-07-15 10:03 Khem Raj
  2016-07-15 14:34 ` akuster808
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2016-07-15 10:03 UTC (permalink / raw)
  To: openembedded-core

This issue is also reported here
https://trac.macports.org/ticket/51709
Patch is also from same ticket

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../recipes-support/nss/nss/pqg.c-ULL_addend.patch | 23 ++++++++++++++++++++++
 meta/recipes-support/nss/nss_3.24.bb               |  1 +
 2 files changed, 24 insertions(+)
 create mode 100644 meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch

diff --git a/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch b/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch
new file mode 100644
index 0000000..9caaaeb
--- /dev/null
+++ b/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch
@@ -0,0 +1,23 @@
+nss does not build on mips with clang because wrong types are used?
+
+pqg.c:339:16: error: comparison of constant 18446744073709551615 with expression of type 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
+     if (addend < MP_DIGIT_MAX) {
+       ~~~~~~ ^ ~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: nss-3.24/nss/lib/freebl/pqg.c
+===================================================================
+--- nss-3.24.orig/nss/lib/freebl/pqg.c
++++ nss-3.24/nss/lib/freebl/pqg.c
+@@ -322,8 +322,8 @@ generate_h_candidate(SECItem *hit, mp_in
+ 
+ static SECStatus
+ addToSeed(const SECItem * seed,
+-          unsigned long   addend,
+-          int             seedlen, /* g in 186-1 */
++          unsigned long long  addend,
++          int                 seedlen, /* g in 186-1 */
+           SECItem * seedout)
+ {
+     mp_int s, sum, modulus, tmp;
diff --git a/meta/recipes-support/nss/nss_3.24.bb b/meta/recipes-support/nss/nss_3.24.bb
index caed7fa..c7c9fab 100644
--- a/meta/recipes-support/nss/nss_3.24.bb
+++ b/meta/recipes-support/nss/nss_3.24.bb
@@ -21,6 +21,7 @@ SRC_URI = "\
     file://nss-fix-incorrect-shebang-of-perl.patch \
     file://nss-fix-nsinstall-build.patch \
     file://disable-Wvarargs-with-clang.patch \
+    file://pqg.c-ULL_addend.patch \
     file://nss.pc.in \
     file://signlibs.sh \
 "
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] nss: Fix build on mips/clang
  2016-07-15 10:03 [PATCH] nss: Fix build on mips/clang Khem Raj
@ 2016-07-15 14:34 ` akuster808
  2016-07-15 14:36   ` Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: akuster808 @ 2016-07-15 14:34 UTC (permalink / raw)
  To: openembedded-core

Does this affect Krogoth?
- armin

On 07/15/2016 03:03 AM, Khem Raj wrote:
> This issue is also reported here
> https://trac.macports.org/ticket/51709
> Patch is also from same ticket
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  .../recipes-support/nss/nss/pqg.c-ULL_addend.patch | 23 ++++++++++++++++++++++
>  meta/recipes-support/nss/nss_3.24.bb               |  1 +
>  2 files changed, 24 insertions(+)
>  create mode 100644 meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch
> 
> diff --git a/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch b/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch
> new file mode 100644
> index 0000000..9caaaeb
> --- /dev/null
> +++ b/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch
> @@ -0,0 +1,23 @@
> +nss does not build on mips with clang because wrong types are used?
> +
> +pqg.c:339:16: error: comparison of constant 18446744073709551615 with expression of type 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
> +     if (addend < MP_DIGIT_MAX) {
> +       ~~~~~~ ^ ~~~~~~~~~~~~
> +
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +Upstream-Status: Pending
> +Index: nss-3.24/nss/lib/freebl/pqg.c
> +===================================================================
> +--- nss-3.24.orig/nss/lib/freebl/pqg.c
> ++++ nss-3.24/nss/lib/freebl/pqg.c
> +@@ -322,8 +322,8 @@ generate_h_candidate(SECItem *hit, mp_in
> + 
> + static SECStatus
> + addToSeed(const SECItem * seed,
> +-          unsigned long   addend,
> +-          int             seedlen, /* g in 186-1 */
> ++          unsigned long long  addend,
> ++          int                 seedlen, /* g in 186-1 */
> +           SECItem * seedout)
> + {
> +     mp_int s, sum, modulus, tmp;
> diff --git a/meta/recipes-support/nss/nss_3.24.bb b/meta/recipes-support/nss/nss_3.24.bb
> index caed7fa..c7c9fab 100644
> --- a/meta/recipes-support/nss/nss_3.24.bb
> +++ b/meta/recipes-support/nss/nss_3.24.bb
> @@ -21,6 +21,7 @@ SRC_URI = "\
>      file://nss-fix-incorrect-shebang-of-perl.patch \
>      file://nss-fix-nsinstall-build.patch \
>      file://disable-Wvarargs-with-clang.patch \
> +    file://pqg.c-ULL_addend.patch \
>      file://nss.pc.in \
>      file://signlibs.sh \
>  "
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] nss: Fix build on mips/clang
  2016-07-15 14:34 ` akuster808
@ 2016-07-15 14:36   ` Khem Raj
  0 siblings, 0 replies; 3+ messages in thread
From: Khem Raj @ 2016-07-15 14:36 UTC (permalink / raw)
  To: akuster808; +Cc: Patches and discussions about the oe-core layer

On Fri, Jul 15, 2016 at 7:34 AM, akuster808 <akuster808@gmail.com> wrote:
> Does this affect Krogoth?


yes


> - armin
>
> On 07/15/2016 03:03 AM, Khem Raj wrote:
>> This issue is also reported here
>> https://trac.macports.org/ticket/51709
>> Patch is also from same ticket
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>>  .../recipes-support/nss/nss/pqg.c-ULL_addend.patch | 23 ++++++++++++++++++++++
>>  meta/recipes-support/nss/nss_3.24.bb               |  1 +
>>  2 files changed, 24 insertions(+)
>>  create mode 100644 meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch
>>
>> diff --git a/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch b/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch
>> new file mode 100644
>> index 0000000..9caaaeb
>> --- /dev/null
>> +++ b/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch
>> @@ -0,0 +1,23 @@
>> +nss does not build on mips with clang because wrong types are used?
>> +
>> +pqg.c:339:16: error: comparison of constant 18446744073709551615 with expression of type 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
>> +     if (addend < MP_DIGIT_MAX) {
>> +       ~~~~~~ ^ ~~~~~~~~~~~~
>> +
>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> +Upstream-Status: Pending
>> +Index: nss-3.24/nss/lib/freebl/pqg.c
>> +===================================================================
>> +--- nss-3.24.orig/nss/lib/freebl/pqg.c
>> ++++ nss-3.24/nss/lib/freebl/pqg.c
>> +@@ -322,8 +322,8 @@ generate_h_candidate(SECItem *hit, mp_in
>> +
>> + static SECStatus
>> + addToSeed(const SECItem * seed,
>> +-          unsigned long   addend,
>> +-          int             seedlen, /* g in 186-1 */
>> ++          unsigned long long  addend,
>> ++          int                 seedlen, /* g in 186-1 */
>> +           SECItem * seedout)
>> + {
>> +     mp_int s, sum, modulus, tmp;
>> diff --git a/meta/recipes-support/nss/nss_3.24.bb b/meta/recipes-support/nss/nss_3.24.bb
>> index caed7fa..c7c9fab 100644
>> --- a/meta/recipes-support/nss/nss_3.24.bb
>> +++ b/meta/recipes-support/nss/nss_3.24.bb
>> @@ -21,6 +21,7 @@ SRC_URI = "\
>>      file://nss-fix-incorrect-shebang-of-perl.patch \
>>      file://nss-fix-nsinstall-build.patch \
>>      file://disable-Wvarargs-with-clang.patch \
>> +    file://pqg.c-ULL_addend.patch \
>>      file://nss.pc.in \
>>      file://signlibs.sh \
>>  "
>>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-15 14:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-15 10:03 [PATCH] nss: Fix build on mips/clang Khem Raj
2016-07-15 14:34 ` akuster808
2016-07-15 14:36   ` Khem Raj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox