Fails to build with GCC < 4.3 on big-endian architectures
Categories
(NSS :: Libraries, defect, P1)
Tracking
(Not tracked)
People
(Reporter: jbeich, Assigned: jbeich)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
1.07 KB,
patch
|
mt
:
review+
|
Details | Diff | Splinter Review |
If __has_builtin returns 0 on big-endian the following may happen:
crypto_primitives.c:31:17: error: use of undeclared identifier 'SHA_MASK8'
t1 = ((t1 & SHA_MASK8) << 8) | ((t1 >> 8) & SHA_MASK8);
^
crypto_primitives.c:31:49: error: use of undeclared identifier 'SHA_MASK8'
t1 = ((t1 & SHA_MASK8) << 8) | ((t1 >> 8) & SHA_MASK8);
^
crypto_primitives.c:32:17: error: use of undeclared identifier 'SHA_MASK16'
t1 = ((t1 & SHA_MASK16) << 16) | ((t1 >> 16) & SHA_MASK16);
^
crypto_primitives.c:32:52: error: use of undeclared identifier 'SHA_MASK16'
t1 = ((t1 & SHA_MASK16) << 16) | ((t1 >> 16) & SHA_MASK16);
^
Found on FreeBSD powerpc64 which defaults to GCC 4.2. See Also has build log.
Sorry, I can't submit on Phabricator due to bug 1536716.
https://treeherder.mozilla.org/#/jobs?repo=nss-try&revision=4a67046bf26afb440c246964b230404f1cbfffa8
Updated•5 years ago
|
Comment 2•5 years ago
|
||
i can confirm that the patch fixes the build on OpenBSD/macppc using gcc 4.2.1
Comment 3•5 years ago
|
||
Jan, are you going to need a 3.44 dot release for FreeBSD for this?
(In reply to J.C. Jones [:jcj] (he/him) from comment #3)
No as big-endian architectures with modern GCC are not affected. FreeBSD powerpc64 uses GCC 8 and system NSS when building Firefox. Carrying the fix downstream until 3.45 or unrelated 3.44.1 would be fine. As ESR68 will require 3.44 and ESR60 prolonged 3.36.* in the past there's high probability 3.44.1 may happen for other reasons. So, let's put the fix on that bandwagon instead.
In short, backport to NSS_3_44_BRANCH but don't bother releasing 3.44.1 just for this bug.
Martin, do any PkgSrc platforms use GCC < 4.3 by default? Which version is used on NetBSD sparc64 and powerpc?
Comment 6•5 years ago
|
||
Pkgsrc forces at least gcc 6.1 for firefox nowadays
(In reply to Martin Husemann from comment #6)
What version is used to build standalone/system NSS i.e., devel/nss package?
Comment 8•5 years ago
|
||
Indeed that might be build using the users default compiler settings (but on some OS we force pkgsrc gcc, which liklely is a new enough version nowadays).
No supported NetBSD release uses a compiler old enough for this issue (4.8.x is the oldest), but I can not clearly rule out strange user setups running into the issue. My guess is they are not very likely to exist in big counts in reality though.
Comment 9•5 years ago
|
||
https://hg.mozilla.org/projects/nss/rev/370a9e85f216f5f4ff277995a997c5c9b23a819f
I landed this on trunk (3.45). Do you need this for 3.44? I can do that, but I don't know if the above discussion indicates that you don't need it.
Updated•5 years ago
|
Assignee | ||
Comment 10•5 years ago
|
||
(In reply to Martin Thomson [:mt:] from comment #9)
Do you need this for 3.44?
Yes. Please, backport to NSS_3_44_BRANCH.
Comment 11•5 years ago
|
||
3.44 backport: https://hg.mozilla.org/projects/nss/rev/b8d286f3f6dd720e39e94c7b558192602e021829
It'll be there as a ridelong for the next point release.
Updated•3 years ago
|
Description
•