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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a37:995:: with SMTP id 143mr13676284qkj.266.1593011522667; Wed, 24 Jun 2020 08:12:02 -0700 (PDT) X-Received: by 2002:aca:6157:: with SMTP id v84mr2932843oib.30.1593011522373; Wed, 24 Jun 2020 08:12:02 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!tr2.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 24 Jun 2020 08:12:02 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=47.185.233.35; posting-account=zwxLlwoAAAChLBU7oraRzNDnqQYkYbpo NNTP-Posting-Host: 47.185.233.35 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> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Ada on Apple's new procesors From: Optikos Injection-Date: Wed, 24 Jun 2020 15:12:02 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:59199 List-Id: On Wednesday, June 24, 2020 at 5:49:03 AM UTC-5, Luke A. Guest wrote: > 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 =E2=80=A2compiler; it needs the runtime to be linked to the user= 's > =E2=80=A2executable=E2=80=A2. In my opinion, the RLE requires a greater = than 100 IQ and > requires that higher intellect to have generous >=20 > Don't know what IQ has to do with anything??? As I explained later in that posting, if this were ever litigated, the judg= e(s) and/or jury would need to be mentally capable of holding the finer poi= nts in their head. That is asking too much for at least 50% of the populat= ion, either due to lower IQ to begin with or laziness not wanting to exerci= se the intellect of which they are actually quite capable. > > patience to discern topics that are subtle. The RLE grants its excepti= on only under certain strict > > terms; otherwise the RLE is written to self-destruct/implode legally, r= everting 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.=20 > > But that is the scot-free way of achieving Eligible Compilation Process= ; there might be messier ways.=20 > > GNAT-LLVM seemingly depends on those messier ways. > >=20 > > The =E2=80=9Cany?=E2=80=9D there is what is an unsettled matter legally= . See below. > >=20 > > the Narrow legal theory: > > When the RLE discusses IR, does it mean semantically-rich IR that repre= sents an Ada (or C or C++) > > AST, and Java bytecode, LLVM textual IR, and LLVM bitcode IR doesn't co= unt as IR? >=20 > From https://www.gnu.org/licenses/gcc-exception-3.1-faq.en.html >=20 > "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 =E2=80=9CCompilation Process.=E2=80=9D The outp= ut you get from > it is called =E2=80=9CTarget Code,=E2=80=9D as long as that output is not= used as > compiler intermediate representation, or to create such an intermediate > representation." >=20 > This is talking about getting access to the compiler's internal > representation on disk after compilation. >=20 > "In order to take advantage of this permission, the Compilation Process > that you use to create Target Code has to be =E2=80=9CEligible,=E2=80=9D = which means > that it does not involve both GCC and GPL-incompatible software." >=20 > * GNAT is GPLv3 (with linking exception). > * GNAT-LLVM bindings are GPLv3 > * LLVM is Apache 2 >=20 > All 3 licences are compatible. >=20 > "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" >=20 > 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. https://kristerw.blogspot.com/2017/08/gcc-low-level-ir-and-basic-code.html In some regards, RTL is analogous to either LLVM textual IR or LLVM bitcode= IR. Dumping out GIMPLE IR from GCC to manipulate it via any GPL-noncompli= ant tool would certainly make the Compilation Process ineligible to be an E= ligible Compilation Process in the RLE. But dumping out RTL IR via -fdump-= rtl-all command-line option, then manipulating it via any GPL-noncompliant = tool seems very likely to also make the Compilation Process ineligible to b= e an Eligible Compilation Process in the RLE. If so, then RLE granting its= exception to GPLv3 in GNAT-LLVM is highly dependent on each possible plug-= in during the optimization phase of LLVM's opt, because legally speaking LL= VM textual IR or LLVM bitcode thereof could be construed as directly analog= ous to RTL. > So, I read the above as being an eligible compilation process. >=20 > "even if you use GCC in conjunction with GPL-incompatible assemblers, That is the meat of the question: is LLVM textual IR (always) categorized = by interpretations of the RLE 1) as mere assembly language (i.e., gets off scot-free) or 2) an IR due to its name being literally IR (i.e., the user of the Compilat= ion Process must walk a narrow path without missteps)? > 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." >=20 > So, the options are: >=20 > 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. Yes, that list itemizes the barriers-to-entry that forms AdaCore's business= model. A profitable business must establish or inherit at least one barri= er to entry, analogous to a military battle taking a hill that is easier to= defend downhill than trying to battle uphill. Plus there is: 8) Consult your legal counsel every time that you modify any of the steps i= n GNAT-LLVM's back-end Compilation Process to assure that it still remains = an =E2=80=A2Eligible=E2=80=A2 Compilation Process. All that I am saying is: with respect to a GNAT-LLVM-generated executable = that links to RLE, legally a) it is a no-brainer if LLVM textual IR or bitcode thereof is definitively= always construed to be an assembly language, but if it is not, then b) effort must be expended at each temptation to utilize the LLVM ecosystem= 's rich feature-set whether the eligibility of the Compilation Process got = ruined by a violation of the GPL's or RLE's terms subtly sneaking in during= opt's stages, especially plug-ins.