delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2000/06/09/12:41:53

Message-Id: <200006091641.MAA22408@delorie.com>
Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
From: "Parker, Ron" <rdparker AT butlermfg DOT com>
To: Chris Faylor <cgf AT cygnus DOT com>, cygwin-apps AT sourceware DOT cygnus DOT com,
cygwin-developers AT sourceware DOT cygnus DOT com
Subject: RE: [cet AT carlthompson DOT net: Re: Extreme newbie here...]
Date: Fri, 9 Jun 2000 11:39:34 -0500
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01BFD231.5A8F7126
Content-Type: text/plain;
	charset="windows-1252"

> Is cygwin really "broken in recent releases"?  Does anyone know why?

EXECUTIVE SUMMARY:

Somewhat.

MORE REALISTIC SUMMARY:

From what I have determined exception handling with -mno-cygwin is
definately broken.  But that is obvious if you look at the excpt.h.  Paul
Baxter actually sent a good email about that to the main list, cf.
http://sourceware.cygnus.com/ml/cygwin/2000-06/msg00346.html.

The other thing that is "broken" is the handling of lib[mc] with g++ which I
have previously mentioned, created a patch to correct, and emailed the new
executable to those that needed it.  

As a side note, I finally tracked down what was needed to release a new gcc
w/o the i686-pc-cygwin directory, but will not be able to do so ... you got
it ... until I get home this evening.  BTW, Chris you should add
"gcc_tooldir=/usr" and "gcc_tooldir=$inst/usr" to the appropriate make
commands in the script from which you mailed excerpts yesterday.

There may also be a problem of -mno-cygwin picking up the cygwin header
files in some cases.  I am looking into this.

I can say that at least the following trivial program works both when
compiled as C with gcc and as C++ with my modified g++.

<--- hello.c --->
#include <windows.h>

int APIENTRY WinMain(HINSTANCE a1,HINSTANCE a2,LPSTR a3,int a4)
{
        MessageBox(NULL, "Hello, world!", NULL, MB_OK);

        return 0;
}
<--- End hello.c --->

However adding the simplest exception handling construct as in the following
code creates a link error.

<--- eh_hello.cpp --->
#include <windows.h>

class foo
{
};

int APIENTRY WinMain(HINSTANCE a1,HINSTANCE a2,LPSTR a3,int a4)
{
        try {
                throw foo();
        }
        catch (foo& f)
        {
                MessageBox(NULL, "Hello, world!", NULL, MB_OK);
        }

        return 0;
}
<--- End eh_hello.cpp --->

Link error:

bash-2.04$ g++ -mno-cygwin -fno-rtti hello.cpp -o hello
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2/libgcc.a(_eh.o): In function
`_eh_rtime_match':
/home/src/gcc-2.95.2/gcc/./libgcc2.c(.text+0x389): undefined reference to
`_impure_ptr'
collect2: ld returned 1 exit status

If your source code will compile with -fno-exceptions, it should work in
most cases.

That is a brief synopsis of what I know.

------_=_NextPart_000_01BFD231.5A8F7126
Content-Type: application/ms-tnef
Content-Transfer-Encoding: base64

eJ8+IgIQAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy
b3NvZnQgTWFpbC5Ob3RlADEIAQSAAQA3AAAAUkU6IFtjZXRAY2FybHRob21wc29uLm5ldDogUmU6
IEV4dHJlbWUgbmV3YmllIGhlcmUuLi5dAOESAQmAAQAhAAAAMDI0Mjc3QTZEQ0JBRDA0QkI3NURF
MkFENTBFRDMwNEYAWgcBIIADAA4AAADQBwYACQALACgAAAAFAB4BAQWAAwAOAAAA0AcGAAkACwAn
ACIABQA/AQENgAQAAgAAAAIAAgABA5AGAIALAAArAAAACwACAAEAAAADAC4AAAAAAEAAOQAwfUdL
MdK/AR4AcAABAAA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i9DTj1SRFBBUktF
UkQwNkZDNDAwAB4A+D8BAAAADAAAAFBhcmtlciwgUm9uAB4AOEABAAAAEQAAAFJEUEFSS0VSRDA2
RkM0MDAAAAAAAgH7PwEAAAB0AAAAAAAAANynQMjAQhAatLkIACsv4YIBAAAABgAAAC9PPUJVVExF
UiBNQU5VRkFDVFVSSU5HIENPTVBBTlkvT1U9QlVJTERJTkdTL0NOPVJFQ0lQSUVOVFMvQ049VE9X
RVIvQ049UkRQQVJLRVJEMDZGQzQwMAAeAPo/AQAAAAwAAABQYXJrZXIsIFJvbgAeADlAAQAAABEA
AABSRFBBUktFUkQwNkZDNDAwAAAAAEAABzBAgIEZKtK/AUAACDAmcY9aMdK/AR4APQABAAAABQAA
AFJFOiAAAAAAHgAdDgEAAAAzAAAAW2NldEBjYXJsdGhvbXBzb24ubmV0OiBSZTogRXh0cmVtZSBu
ZXdiaWUgaGVyZS4uLl0AAAsAKQAAAAAACwAjAAAAAAADAAYQTXTakAMABxC5BgAAAwAQEAEAAAAD
ABEQAQAAAB4ACBABAAAAZQAAAElTQ1lHV0lOUkVBTExZIkJST0tFTklOUkVDRU5UUkVMRUFTRVMi
P0RPRVNBTllPTkVLTk9XV0hZP0VYRUNVVElWRVNVTU1BUlk6U09NRVdIQVRNT1JFUkVBTElTVElD
U1VNTUEAAAAAUhg=

------_=_NextPart_000_01BFD231.5A8F7126--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019