Re: C++ compiler binary compatibility in XPCOM

"Tim Hill" <[email protected]> Thu, 5 Sep 2002 16:11:45 -0500
Newsgroups gmane.comp.mozilla.devel.xpcom
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
I'm working on XPCOM support for Borland Delphi/Object Pascal.  Eventually
I'd like it to work under Kylix (the Linux version of Delphi) as well.
According to a Kylix readme:
"Kylix virtual method tables (VMTs) conform to the currently proposed UNIX
ABI specification. To make gcc generate conforming VMTs for C++ objects, you
must use gcc version 2.95 or later and specify the COM_INTERFACE attribute
in the C++ class declaration. Without this attribute, gcc may insert
information that changes the VMT offsets and makes Kylix calls to C++
methods fail."

From reading an earlier thread, I guess the official Mozilla compiler on
Linux is egcs-1.1.2?  So I'm assuming using VMTs from Kylix won't work,
unless I compiled Mozilla myself with gcc 2.95 and I added COM_INTERFACE to
nsISupports. (When) Does Mozilla.org plan to switch to gcc 3.x for official
builds?  Is it correct that the default VMT format in gcc 3.x is equivalent
to gcc 2.95+COM_INTERFACE?

Tim