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)
Tracking
()
RESOLVED
FIXED
People
(Reporter: Joerg.Brunsmann, Assigned: shaver)
References
Details
Attachments
(1 file)
|
1.82 KB,
patch
|
Details | Diff | Splinter Review |
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.
Comment 1•25 years ago
|
||
I'll handle this
Assignee: dp → scc
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•25 years ago
|
||
patch checked in
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 3•25 years ago
|
||
- Per last comments, age of bug, and no reopen - Marking Verified/Fixed. Please
reopen if still a problem.
Status: RESOLVED → VERIFIED
Comment 4•25 years ago
|
||
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 → ---
Comment 5•25 years ago
|
||
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
Comment 6•25 years ago
|
||
Comment 7•25 years ago
|
||
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
Comment 8•25 years ago
|
||
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
Comment 9•25 years ago
|
||
Compiles and runs for me on 4.) RELEASE
--pete
| Assignee | ||
Comment 10•25 years ago
|
||
One down, 5.x to go.
(And approval, natch.)
Status: NEW → ASSIGNED
Comment 11•25 years ago
|
||
I applied the patch ... and as You can see ... my Tinderbox build is still All
Green :-)
I'd say ... it works
Comment 12•25 years ago
|
||
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!
| Assignee | ||
Comment 13•25 years ago
|
||
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?
| Assignee | ||
Comment 14•25 years ago
|
||
*** Bug 33739 has been marked as a duplicate of this bug. ***
| Assignee | ||
Comment 15•25 years ago
|
||
jband? scc? have any spare review cycles?
Updated•25 years ago
|
QA Contact: leger → kandrot
| Assignee | ||
Comment 16•24 years ago
|
||
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 ago → 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•