From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: snag in building Ada mode Emacs module on Linux References: <85d21um5dn.fsf@stephe-leake.org> Date: Wed, 27 May 2015 23:14:44 -0500 Message-ID: <85bnh51gp7.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (windows-nt) Cancel-Lock: sha1:xIb4CX2WdKOQ7LCTyU6GWc/hgKM= MIME-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: ebf7c5566963be97f808406078 X-Received-Bytes: 2144 X-Received-Body-CRC: 936951176 Xref: news.eternal-september.org comp.lang.ada:26026 Date: 2015-05-27T23:14:44-05:00 List-Id: Simon Wright writes: > Stephen Leake writes: > >> The module doesn't compile on Linux, because GNAT GPL 2014 doesn't >> provide a (static or dynamic) libgnat for the sjlj runtime that is >> compiled with -fPIC. I need -fPIC on all code in order to include it >> in the dynamic library that is the Emacs module. I need the sjlj >> runtime to support raising exceptions in the module; since Emacs is >> not an Ada main, it uses the sjlj exception method. > > What will you do with the exceptions once they propagate out of Ada? There's a top-level exception handler at the Ada/C boundary. > Or > is it that exceptions won't work at all, even if caught at the boundary > and converted to a status return/out parameter? They don't work at all; they generate SEGV. >> Is there a similar problem on the Mac? > > Yes. > > Will it be easy to recompile the runtime with a different exception > method? I don't even know what the switches would be! At least GNAT GPL > 2014 comes with an adalib/Makefile.adalib; For GNAT GPL, apparently we can do: cd /usr/gnat/lib/gcc/x86_64-pc-linux-gnu/4.7.4/rts-sjlj chmod +w * make -f Makefile.adalib ROOT=/usr/gnat CFLAGS='-fPIC' chmod -w * but I haven't tried it yet. > the FSF GCCs don't (but the > GPL 2014 one might well work with minimal change). Hmph. I'll just dump that issue on the Linux packagers. -- -- Stephe