Hi,

As you may or may not remember, I'm writing a Clang MinGW Driver
implementation, so that clang does not need the gcc executable anymore when
linking and calls ld directly.

In my attempts to get this right, I stumbled upon a mysterious something:
there are two versions of crtbegin.o and crtend.o. One in
<sysroot>/lib/gcc/<triple>/version, and one in <sysroot>/<triple>/lib.

Now, when I use the gcc version, everyting (i.e. exceptions throwing and
catching) works fine. When I instead instruct clang to use the MinGW-w64
versions, my simple C++ exception "Hello World" fails to catch an exception.

Now, as my intent is to remove all GCC dependencies (apparently these crt
files and later on replacing libgcc/libstdc++ with compiler-rt/libc++/..)
in the long run, I wonder how to handle this. Are the MinGW-w64 versions
just not functional or only for bootstrapping GCC or ...?

Documentation on this is nonexistent, and I need to know ;-). I don't know
of any of these object files in the clang source tree, so I think it either
uses glibc's or also gcc's on Linux. On Mac probably some proprietary blob.

This is with 32-bit dw2 exception handling. I know you guys hate it, but
Clang has no sjlj EH for x86 targets, and this works currently (using the
GCC crtbegin/crtend).

Any help is much appreciated!

Ruben
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to