Exceptions in ARM

Timo Sintonen t.sintonen at luukku.com
Sat Mar 8 23:57:45 PST 2014


Now I got the exceptions to work.

I have not been able to find how to control the libgcc build 
process. The configure script seems not to know that I give 
different defaults for the compiler in --with switches. Configure 
still assumes the compiler defaults arm mode although it is in 
thumb mode. I should also be able to give different default 
values to all four libraries that are built.

I solved this by building with defaults and then hacked the 
makefile of that libgcc directory I use. (fpu) Then I remade the 
library. Changing LIBGCC_FLAGS at line 229 did the trick.

So exceptions seems to work now. There is one thing: because I do 
not have gc, the OurUnwindException struct that is allocated in 
_d_throw is never freed. This is an issue for anybody not using 
gc, so there should be a general solution.

The three problems in this project were:
- struct alignment issue that Iain has fixed
- a change/bug in gcc in january-february causing different 
object generation. Seems to be fixed in head now.
- building libgcc with the same settings than the rest of the 
application. I am  still looking a way to control the library 
build process.



More information about the D.gnu mailing list