Closed Bug 207803 Opened 21 years ago Closed 12 years ago

[PATCH] Add FreeBSD Sparc64 support to Mozilla

Categories

(Core :: XPConnect, defect)

Other
FreeBSD
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: marcus, Unassigned)

References

Details

Attachments

(4 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4b) Gecko/20030531 Mozilla Firebird/0.6
Build Identifier: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4b) Gecko/20030531 Mozilla Firebird/0.6

The attached patches created by Thomas Moestl <tmm@FreeBSD.org>, Kris Kennaway
<kris@freebsd.org>, and myself add 64-bit UltraSPARC FreeBSD support to Mozilla.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
This patch replaces the patch to unix.c in the previous attachment.  It uses
the autoconf system to teach nspr that FreeBSD has socklen_t.
Note, previous patch was alsmo submitted by Thomas Moestl.
-> nspr and confirming
Assignee: general → wchang0222
Status: UNCONFIRMED → NEW
Component: Browser-General → NSPR
Ever confirmed: true
Product: Browser → NSPR
QA Contact: general → wchang0222
Version: Trunk → 3.0
Comment on attachment 124646 [details] [diff] [review]
Patch to add 64-bit UltraSPARC FreeBSD to Mozilla (NSPR portion checked in)

r=wtc on the NSPR portion of this patch.  I understand that
the patch for unix.c should be ignored and replaced by the next
patch.

Someone else needs to review the xpcom/reflect/xptcall portion
of this patch.
Attachment #124646 - Flags: review?(wchang0222) → review+
Comment on attachment 124684 [details] [diff] [review]
Better patch to teach nspr we have socklen_t (checked in)

This patch and the NSPR portion of the previous patch have
been checked in on the NSPR trunk (NSPR 4.5) and
NSPRPUB_PRE_4_2_CLIENT_BRANCH (Mozilla 1.6b).
Attachment #124684 - Flags: review+
Joe, do all recent FreeBSD versions have socklen_t?

Reassigned to the owner of xpcom/reflect/xptcall to review
the xpcom/reflect/xptcall portion of the first patch (attachment
124646 [details] [diff] [review]).
Assignee: wchang0222 → BradleyJunk
Component: NSPR → XPConnect
Product: NSPR → Browser
QA Contact: wchang0222 → PhilSchwartau
Version: 3.0 → Trunk
cc'ing some people about that transformiix patch
Yes, all recent (supported) versions of FreeBSD have socklen_t.  The type was
added over three years ago, and first appeared in FreeBSD 3.5-RELEASE.
This patch corrects recent crashes that crept back in on Sparc64.  This was
done by Thomas Moestl <tmm@FreeBSD.org>.  Here is his description:

The problem was that values stored in arrays of 32-bit integers were used as
doubles via pointer magic. Since doubles have stricter alignment requirements
(8 bytes) than the compiler guarantees for these arrays,this can lead to
problems on platforms which do not allow unaligned memory accesses, like
sparc64 or alpha (while there's fixup code forsome instructions on sparc64, the
one used for doubles is not supported by that code currently). This is of
course only triggered if those variables are not on an 8-byte boundary by
chance, which is why it didn't occur earlier with the same version of
Double.cpp.  The patch changes that code to use unions for the type conversion,
which is the standard way of doing such things.
Attachment #125159 - Attachment is obsolete: true
Comment on attachment 135668 [details] [diff] [review]
New fix for transformiix on FreeBSD

Looks good to me, r=sicking
Attachment #135668 - Flags: review+
This fix is from the OpenBSD mozilla port. I think it does the same thing in a
different way.
Comment on attachment 141327 [details] [diff] [review]
Similar fix from OpenBSD ports

Could you explain what problem this patch solves? Also, shouldn't the
STRIC_ALIGN define live inside some sort of #ifdef for this platform only, i
doubt that compiles across all compilers.
Comment on attachment 135668 [details] [diff] [review]
New fix for transformiix on FreeBSD

this patch is better, although brendan mentioned there's more that should be
swiped from jsnum.[ch]
Attachment #135668 - Flags: superreview?(brendan)
Comment on attachment 135668 [details] [diff] [review]
New fix for transformiix on FreeBSD

This rips off js/src/jsnum.[ch] incompletely -- besides needing a union to
align the uint32 pairs as this patch does, you need to consider ARM's
"PDP-endian-ness".

/be
Attachment #135668 - Flags: superreview-
Brendan, what is "PDP-endian-ness"?

In prdtoa.c, we added a new macro IEEE_ARM to
handle ARM's double.  See
http://lxr.mozilla.org/nspr/source/nsprpub/pr/src/misc/prdtoa.c#143.

Is that what you were referring to?
Attachment #124646 - Attachment description: Patch to add 64-bit UltraSPARC FreeBSD to Mozilla → Patch to add 64-bit UltraSPARC FreeBSD to Mozilla (NSPR portion checked in)
Attachment #124684 - Attachment description: Better patch to teach nspr we have socklen_t → Better patch to teach nspr we have socklen_t (checked in)
Assignee: dbradley → nobody
QA Contact: pschwartau → xpconnect
Attachment #135668 - Flags: superreview?(brendan)
According to this link - http://freebsd.1045724.n5.nabble.com/Does-Firefox-run-on-the-SPARC64-port-of-FreeBSD-tp3749610p3749611.html at least Firefox is working with FreeBSD starting from 6.2, so closing bug as WFM.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: