Closed Bug 39268 Opened 25 years ago Closed 24 years ago

xptc on FreeBSD 3.x with gcc > 2.7 doesn't work

Categories

(Core :: XPCOM, defect, P3)

Sun
Solaris
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: Joerg.Brunsmann, Assigned: shaver)

References

Details

Attachments

(1 file)

Here's a patch: Index: xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h =================================================================== RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h,v retrieving revision 1.6 diff -r1.6 xptc_platforms_unixish_x86.h 62c62 < #elif __FreeBSD_version == 340000 --- > #elif (__FreeBSD_version == 340000) && (__GNUC__ == 2) && (__GNUC_MINOR__ == 7) Can you please check it in? Thanks.
I'll handle this
Assignee: dp → scc
Status: UNCONFIRMED → NEW
Ever confirmed: true
patch checked in
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
- Per last comments, age of bug, and no reopen - Marking Verified/Fixed. Please reopen if still a problem.
Status: RESOLVED → VERIFIED
This fix should be changed to apply to anything in the 3.x series, not just 3.4. The obvious fix would be to say (__FreeBSD_version < 400000); I'll test this on my 3.5.1 box to confirm it (both for the system gcc 2.7.2.3 and gcc 2.95.2).
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Okay, I've done some more analysis of this. Here's what's going on; it's why there's been so much confusion over FreeBSD xptc. /usr/bin/g++ in every released version of FreeBSD has used CFront-style object layout. In 3.x, /usr/bin/g++ is gcc 2.7.2.3; in 4.x releases and in 5.0-CURRENT, /usr/src/contrib/gcc/config/freebsd.h has DEFAULT_VTABLE_THUNKS #undef'd. The complications arise from two facts. First of all, there was a period of time during the development of 4.0-CURRENT (from September 1999 to January 2000) when /usr/bin/g++ used thunks. This was changed before 4.0-RELEASE, but people in the past were compiling Mozilla on 4.0-CURRENT. Secondly, the versions of gcc 2.95 from the FreeBSD ports collection (/usr/ports/lang/egcs, which gets installed as /usr/local/bin/g++295) *do* use thunks. Anyone wanting to compile with gcc 2.95 on FreeBSD 3.x uses these version. (This will also happen, I believe, if you use the stock FSF gcc 2.95.x.) Fortunately, I believe all this stuff can be disambiguated with the preprocessor symbol __FreeBSD_cc_version. This is only defined by the /usr/bin versions of the compiler, so its absence indicates that you're using a ported or FSF version of gcc. In the two versions of the system compiler which used thunks, its value was 400002 and 400003. I've created a patch which implements this. It works for me on FreeBSD 3.5.1 using both /usr/bin/g++ and /usr/local/bin/g++295. It needs testing on 4.x and 5.x, though.
Summary: xptc on FreeBSD 3.4 with gcc > 2.7 doesn't work → xptc on FreeBSD 3.x with gcc > 2.7 doesn't work
jband: I'm not sure why this bug is assigned to me, though I'm capable of checking in a patch ... should you own this? or someone else?
Assignee: scc → jband
Status: REOPENED → NEW
shaver gets these. He's been actively working with folks lately to get all these xptcall x86 Unixish platform issues under control.
Assignee: jband → shaver
Compiles and runs for me on 4.) RELEASE --pete
One down, 5.x to go. (And approval, natch.)
Status: NEW → ASSIGNED
I applied the patch ... and as You can see ... my Tinderbox build is still All Green :-) I'd say ... it works
For those who don't follow netscape.public.mozilla.unix (or tinderbox) religiously, Pascal's machine shadowmere is the FreeBSD 5.0-CURRENT tinderbox. Thanks, Pascal!
Sorry for not noticing earlier that we made 5.0 work as well! OK, can someone other than me review, and then I'll sr= and check it in?
*** Bug 33739 has been marked as a duplicate of this bug. ***
jband? scc? have any spare review cycles?
QA Contact: leger → kandrot
This is now fixed in the tip and the 0.8.1 branch. Sorry for the extreme delay. =( If you'd like to contribute a milestone build for 0.8.1, please read http://www.mozilla.org/build/distribution.html and send me email about where to find the completed build.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago24 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: