On 3 Jun 2015, at 10:55, Simon Wright <[email protected]> wrote:
> On 2 Jun 2015, at 23:42, Stephen Leake <[email protected]> wrote: > >> Simon Wright <[email protected]> writes: > >>> Looking good so far; I’ve made a basic-ada module, and exceptions get >>> handled just fine in spite of Mac not having sjlj. If this is what you >>> mean. >> >> You only need sjlj if exceptions cross an Ada/C boundary. I just need to >> nail down where that happens in my code. > > Oh, I’ll have a go at building yours then. It was a bit of a battle, but I got a build. How can I provoke an exception to check out whether there’s a problem on Mac? What I’ve done so far is * indent good code OK * indent incorrect code (same behaviour as normal; C-c C-f worked OK) * indent a 7000-line file; not fast, but OK Changes in attached patches: * I modified ada-wisi.el to handle dll naming & file extension * the code at the end of emacs_module_h.ads.gp failed, because ‘Size isn’t static so can’t be used to define a constant ; I just commented-out the emacs_env_25_byte_size definition and its uses. GNAT GPL 2014, FSF GCC 4.9.1. gcc -c -fPIC opentoken-token-wisi_elisp.adb emacs_module_h.ads:170:41: non-static expression used in number declaration emacs_module_h.ads:170:85: size attribute is only static for static scalar type (RM 4.9(7,8)) I couldn’t easily use the makefile, so edited the generated GPR and C source, see attached mac_* files. With these, gprbuild worked fine and produced an SAL .dylib without fuss (I’d set up environment variables in the shell pro tem): $ gprbuild -p -P mac_ada_grammar_wisi_module_parse_agg.gpr gcc -c -fPIC -DEMACS_VALUE_TYPE=int64_t -I/Users/simon/tmp/emacs-dynamic-module/src mac_ada_grammar_wisi_module_parse_wrapper.c gcc -c -fPIC opentoken-token-wisi_elisp.adb gcc -c -fPIC emacs_module_h.ads gcc -c -fPIC emacs_module_aux.adb gcc -c -fPIC ada_grammar_module.adb gprlib ada_grammar_wisi_module_parse.lexch gnatbind -n -o b__ada_grammar_wisi_module_parse.adb -Lada_grammar_wisi_module_parse -a /users/simon/tmp/ada-mode-wisi/build/wisi/.build/opentoken-token-wisi_elisp.ali ... gcc -c -x ada -gnatA -gnatws b__ada_grammar_wisi_module_parse.adb -o b__ada_grammar_wisi_module_parse.o ... gcc -dynamiclib -shared-libgcc -o /users/simon/tmp/ada-mode-wisi/build/wisi/lib/libada_grammar_wisi_module_parse.dylib ... /users/simon/tmp/ada-mode-wisi/build/wisi/.build/mac_ada_grammar_wisi_module_parse_wrapper.o ...
patches
Description: Binary data
mac_ada_grammar_wisi_module_parse_agg.gpr
Description: Binary data
mac_ada_grammar_wisi_module_parse_wrapper.c
Description: Binary data
mac_ada_grammar_wisi_module_parse.gpr
Description: Binary data
_______________________________________________ Emacs-ada-mode mailing list [email protected] http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org
