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!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: snag in building Ada mode Emacs module on Linux Date: Thu, 21 May 2015 14:39:00 +0100 Organization: A noiseless patient Spider Message-ID: References: <85d21um5dn.fsf@stephe-leake.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="8f3bdf433f184ad9fec01bd73e350c65"; logging-data="2198"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX190fA+82772cncYIZ4guOaSBqM3ORTh2Q0=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:9rsnT/XQrGyZUiySU1StlFPT3cw= sha1:8RxGpmrcKfm7bNFRHja7VTH/y0Y= Xref: news.eternal-september.org comp.lang.ada:25931 Date: 2015-05-21T14:39:00+01:00 List-Id: 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? Or is it that exceptions won't work at all, even if caught at the boundary and converted to a status return/out parameter? > 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; the FSF GCCs don't (but the GPL 2014 one might well work with minimal change).