www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.ide
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript
electronics




D.gnu - completely unable to cross-build gdc for mingw32

↑ ↓ ← downs <default_357-line yahoo.de> writes:
I have in the last few days made about a dozen of attempts to cross-build GDC's
SVN version on GCC 4.1.2, targetting mingw32.

I have been completely unable to get a working compiler out of this. All the
compilers I tested were completely unable to handle exceptions (instead of
traversing the stack, the test program, a simple "try throw new Exception("");
catch (Exception ex) { }", takes the easy way out and simply exits).

Did anybody here have the same problem, and can help me out? What's the secret
ingredient required to make GDC cross-compiling work?

Any hints greatly appreciated,

 --downs (desperate)
Feb 05 2008
↑ ↓ → downs <default_357-line yahoo.de> writes:
downs wrote:
 I have in the last few days made about a dozen of attempts to cross-build
GDC's SVN version on GCC 4.1.2, targetting mingw32.
 
 I have been completely unable to get a working compiler out of this. All the
compilers I tested were completely unable to handle exceptions (instead of
traversing the stack, the test program, a simple "try throw new Exception("");
catch (Exception ex) { }", takes the easy way out and simply exits).
 
 Did anybody here have the same problem, and can help me out? What's the secret
ingredient required to make GDC cross-compiling work?
 
 Any hints greatly appreciated,
 
  --downs (desperate)

I have reproduced the problem on native Linux. It's definitely the SjLj exceptions' fault - somehow GCC's unwinding code is unable to see the handlers that GDC generated. I'm a complete noob in this regard, but I went ahead and added some debugging code that seems to indicate the stack traversal code completely ignores all present exception handlers and terminates with "bottom of stack found". I can see two options. One, make SjLj exceptions work reliably, or two, try to get dwarf2 exceptions to work under win32. Either way, I have no idea how to proceed. Help urgently needed. --downs
Feb 05 2008