public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Edward S. Peschko" <esp5@pge.com>
To: Kai Henningsen <kaih@khms.westfalen.de>
Cc: gcc@gcc.gnu.org
Subject: Re: open watcom compiling gcc on win32
Date: Mon, 02 Feb 2004 19:57:00 -0000	[thread overview]
Message-ID: <20040202195238.GA20806@mdssdev05.comp.pge.com> (raw)
In-Reply-To: <923Z3-IHw-B@khms.westfalen.de>

On Sun, Feb 01, 2004 at 01:58:00PM +0200, Kai Henningsen wrote:
> esp5@pge.com (Edward S. Peschko)  wrote on 30.01.04 in <20040130211615.GA16722@mdssdev05.comp.pge.com>:
> 
> > Right now, the perl world on win32 is pretty much divided in half, with
> > the cygwin perl on the one hand, and the activestate perl on the other.
> > python is the same way.
> 
> The question is of course, _why_ is it split like this?
> 
> I do _not_ believe that C++ binary compatibility is the reason. The vast  
> majority of Perl native-code modules is written in C, not C++, and there  
> is no ABI incompatibility with C. In fact, I'm using DLLs from gcc- 
> compiled code (specifically, a Linux-hosted MinGW cross-compiler - it  
> turns out much easier to deal with cross issues than with Windows issues  
> for tools and makefiles for my case) and have not ever had an ABI  
> compatibility problem, because most DLLs still have C-based interfaces.  
> (That may change, of course.)

Well, it goes deeper than that - most developers use Visual C++ as their 
front-end, especially for GUI-driven apps. They use VC++-isms in 
their code and VC++ objects because that's what the activestate folks 
have compiled perl with - VC++. Hence, 50 or so win32 modules that 
use c++ 'by default' because the vc++ IDE makes vc++ constructs.

But you are right, the msvcrt.dll vs. cygwin1.dll is an issue that's just as large
(or larger). I've got some ideas on how to link with both.  And then find a way to 
overcome the VC++ ABI compatibility.

Anyways, I've been looking at that patent, and I think that it isn't that big 
a deal. Its fairly narrow, it doesn't cover any of the difficult stuff like RTTI, 
and - best yet - it looks like a patent that primarily pertains to generating
a vtable, not reading it. 

In particular, I don't think it would be infringing on the patent if a utility was 
built to read the vtable format, and to *write out* a vtable format that is compatible
with g++. To make it unproprietary. The first claim is the most important, and I think
that this step: 

    e) overriding the pointer to the virtual function in the virtual function table 
    associated with the designated base class with a pointer to the compiled overriding 
    virtual function. 

is especially vulnerable because any reverse engineering that g++/gcc would do
would be not be performing this step, and if anything performing this step in 
reverse. 

Claims 2-14 are pretty much variations on claim 1; claims 15 - 18 cover runtime 
access of the vtable (which any conversion utility would overstep) and claim #19
goes back to a variation of claim 1 for good measure.

That's the way I see it at least. Perhaps gcc/g++ could follow Borland's footsteps 
with cofftoomf.exe, start a new project and make a translation utility. That way,
the core g++/gcc would be safe, and the new utility would interface with gcc..

Ed

(
ps - oscar, you are right... borland does not link with c++ dlls, at least 
as far as I can see. I still think it would be worthwhile to do so.
)

(
pps - the way I was thinking of doing the cygwin/mingw merge was to prefix
all of the cygwin function calls with 'cygwin_', and to link with both 
msvcrt.dll and cygwin.dll at the same time. How feasible is this?
)

(
ppps - are the cygwin/mingw patches 'fully integrated' into the mainline? Or are 
there outstanding patches?
)

  reply	other threads:[~2004-02-02 19:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-27  8:02 Edward S. Peschko
2004-01-27  8:53 ` Marcel Cox
2004-01-27 18:38   ` Edward S. Peschko
2004-01-28 20:29     ` Marcel Cox
2004-01-29 23:32       ` Edward S. Peschko
2004-01-29 23:51         ` DJ Delorie
2004-01-30  0:29           ` Edward S. Peschko
2004-01-30  0:45             ` DJ Delorie
2004-01-30  1:20               ` Edward S. Peschko
2004-01-30 17:41                 ` Oscar Fuentes
2004-01-30 21:40                   ` Edward S. Peschko
2004-01-30 22:21                     ` Ian Lance Taylor
2004-01-30 22:52                       ` Devang Patel
2004-01-30 22:53                         ` Robert Dewar
2004-01-30 23:25                       ` Edward S. Peschko
2004-01-31 20:18                         ` Oscar Fuentes
2004-01-30 23:55                       ` tm_gccmail
2004-02-01 14:43                     ` Kai Henningsen
2004-02-02 19:57                       ` Edward S. Peschko [this message]
2004-01-30  0:37           ` Jonathan Wilson
2004-02-05  2:28             ` Christopher Faylor
2004-01-30  0:26         ` Jonathan Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040202195238.GA20806@mdssdev05.comp.pge.com \
    --to=esp5@pge.com \
    --cc=gcc@gcc.gnu.org \
    --cc=kaih@khms.westfalen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).