From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on ip-172-31-74-118.ec2.internal 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!feeder.eternal-september.org!aioe.org!.POSTED.jFK6OqqKW5bkmQ4H/i1UAQ.user.gioia.aioe.org!not-for-mail From: "Luke A. Guest" Newsgroups: comp.lang.ada Subject: Re: Ada on Apple's new procesors Date: Wed, 24 Jun 2020 11:48:07 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <4d9fa282-830d-42f7-a3bf-ba127cb2ad06o@googlegroups.com> <8332f305-299f-45d7-9f9d-2cad924b24d8o@googlegroups.com> <9d941aca-2eb6-4f35-a346-c290c4666bdfo@googlegroups.com> <14ffa125-e27d-4d34-8c12-27afb2ea0b13o@googlegroups.com> NNTP-Posting-Host: jFK6OqqKW5bkmQ4H/i1UAQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 X-Notice: Filtered by postfilter v. 0.9.2 Content-Language: en-GB Xref: reader01.eternal-september.org comp.lang.ada:59197 List-Id: On 24/06/2020 02:02, Optikos wrote: >> The compiler links to GNAT-LLVM, the runtime doesn't. >> To cause RLE to elide itself, the Ada runtime does not need to link with the •compiler; it needs the runtime to be linked to the user's •executable•. In my opinion, the RLE requires a greater than 100 IQ and requires that higher intellect to have generous Don't know what IQ has to do with anything??? > patience to discern topics that are subtle. The RLE grants its exception only under certain strict terms; otherwise the RLE is written to self-destruct/implode legally, reverting the user's executable to pure GPL. One of those strict terms is Eligible Compilation Process. To clearly be an (RLE-)Eligible Compilation Process, the Compilation Process must not write out (any?) intermediate representation. But that is the scot-free way of achieving Eligible Compilation Process; there might be messier ways. GNAT-LLVM seemingly depends on those messier ways. > > The “any?” there is what is an unsettled matter legally. See below. > > the Narrow legal theory: > When the RLE discusses IR, does it mean semantically-rich IR that represents an Ada (or C or C++) AST, and Java bytecode, LLVM textual IR, and LLVM bitcode IR doesn't count as IR? >From https://www.gnu.org/licenses/gcc-exception-3.1-faq.en.html "When you compile those source code files, they usually go through a series of steps: source code generation, preprocessing, compilation to low-level code, assembling, and linking. Not all projects follow all these steps, depending on what language you're using and how it's written, but they'll always go in this order, and everyone using GCC will go through the process of compiling high-level code into some low-level language such as assembly code or Java bytecode. This phase is when GCC combines or links your own code with code from the GCC libraries. We call it the “Compilation Process.” The output you get from it is called “Target Code,” as long as that output is not used as compiler intermediate representation, or to create such an intermediate representation." This is talking about getting access to the compiler's internal representation on disk after compilation. "In order to take advantage of this permission, the Compilation Process that you use to create Target Code has to be “Eligible,” which means that it does not involve both GCC and GPL-incompatible software." * GNAT is GPLv3 (with linking exception). * GNAT-LLVM bindings are GPLv3 * LLVM is Apache 2 All 3 licences are compatible. "It's important to remember that the Compilation Process starts when you feed any high-level code to GCC, and ends as soon as it generates anything that can be considered Target Code. Because of that, as long as GCC isn't writing out intermediate representation, your Compilation Process can still be Eligible" GNAT is linked to the LLVM libraries via the bindings. They generate a GNAT AST within GNAT, which is then converted via the bindings to an LLVM IR AST in memory, these are then passed to the code optimising and codegen functions in LLVM which generates the final binary. There is no dumping of GCC's IR to disk here, it's all handled in memory. You can get the LLVM IR from this using a switch, there is no way to access or dump to disk GCC's IR from GNAT-LLVM. So, I read the above as being an eligible compilation process. "even if you use GCC in conjunction with GPL-incompatible assemblers, linkers, or high-level source generators: those programs aren't involved in the Compilation Process as it's defined here. The only place you can't use GPL-incompatible software with GCC is when it's performing the core compilation work." So, the options are: 1) AdaCore or FSF legal advise on whether it's legal or not. 2) AdaCore adds the linking exception to GNAT-LLVM, which still might not clear up any confusion and would require 1. 3) You use a different Ada compiler with a more permissive licence, oh there aren't any. 4) You buy a licence from AdaCore, too expensive. 5) Write your own Ada compiler. 6) Use another language. 7) Write your own compiler for your own language.