comp.lang.ada
 help / color / mirror / Atom feed
From: Optikos <ZUERCHER_Andreas@outlook.com>
Subject: Re: Ada on Apple's new procesors
Date: Wed, 24 Jun 2020 08:12:02 -0700 (PDT)	[thread overview]
Message-ID: <dee4512c-c851-4438-9561-a4f5b1ff948do@googlegroups.com> (raw)
In-Reply-To: <rcvb2q$1ppg$1@gioia.aioe.org>

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 •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???

As I explained later in that posting, if this were ever litigated, the judge(s) and/or jury would need to be mentally capable of holding the finer points in their head.  That is asking too much for at least 50% of the population, either due to lower IQ to begin with or laziness not wanting to exercise the intellect of which they are actually quite capable.

> > 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.

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-noncompliant tool would certainly make the Compilation Process ineligible to be an Eligible 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 be 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 LLVM textual IR or LLVM bitcode thereof could be construed as directly analogous to RTL.

> So, I read the above as being an eligible compilation process.
> 
> "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 Compilation 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."
> 
> 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.

Yes, that list itemizes the barriers-to-entry that forms AdaCore's business model.  A profitable business must establish or inherit at least one barrier 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 in GNAT-LLVM's back-end Compilation Process to assure that it still remains an •Eligible• 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.

  reply	other threads:[~2020-06-24 15:12 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22 22:53 Ada on Apple's new procesors Jerry
2020-06-23 10:42 ` Vadim Godunko
2020-06-23 10:43 ` Luke A. Guest
2020-06-23 16:16   ` Optikos
2020-06-23 17:52     ` Luke A. Guest
2020-06-23 20:25       ` Optikos
2020-06-23 23:07         ` Luke A. Guest
2020-06-24  1:02           ` Optikos
2020-06-24 10:48             ` Luke A. Guest
2020-06-24 15:12               ` Optikos [this message]
2020-06-24 15:38                 ` Luke A. Guest
2020-06-24 16:35                   ` Simon Wright
2020-06-24 17:58                     ` Luke A. Guest
2020-06-24 18:18                       ` Stephen Leake
2020-06-24 18:30                         ` Luke A. Guest
2020-06-24 18:37                         ` Wesley Pan
2020-06-24 18:55                         ` Optikos
2020-06-24 19:58                           ` Luke A. Guest
2020-06-24 19:06                     ` Optikos
2020-06-24 19:26                       ` Simon Wright
2020-06-24 20:03                         ` Luke A. Guest
2020-06-25 10:25                           ` Simon Wright
2020-06-25 10:49                             ` Luke A. Guest
2020-06-25 11:08                               ` Simon Wright
2020-06-24 20:02                       ` Luke A. Guest
2020-06-25  7:21           ` charlet
2020-06-25  9:55             ` Luke A. Guest
2020-06-25 10:14               ` charlet
2020-06-25 11:03                 ` Simon Wright
2020-06-25 11:25                   ` Luke A. Guest
2020-06-25 12:50                     ` Luke A. Guest
2020-06-29 10:33                       ` Luke A. Guest
2020-06-25 16:15                 ` Optikos
2020-06-30 11:16                   ` Fabien Chouteau
2020-06-30 12:28                     ` Optikos
2020-06-30 13:28                       ` Luke A. Guest
2020-06-30 13:26                     ` Luke A. Guest
2020-06-30 14:35                       ` charlet
2020-06-30 14:46                         ` Luke A. Guest
2020-06-30 14:59                           ` charlet
2020-06-30 15:15                             ` Luke A. Guest
2020-06-30 19:12                             ` Optikos
2020-06-30 20:15                               ` Simon Wright
2020-06-30 20:20                                 ` Dennis Lee Bieber
2020-06-30 20:20                                 ` Luke A. Guest
2020-06-30 22:07                                   ` Wesley Pan
2020-06-30 23:25                                     ` Luke A. Guest
2020-07-01  4:46                                 ` Optikos
2020-07-01  9:23                                   ` Fabien Chouteau
2020-07-01 11:03                                     ` Simon Wright
2020-07-01 12:55                                     ` Optikos
2020-07-03  0:51                                     ` Wesley Pan
2020-07-03 11:08                                     ` gautier_niouzes
2020-06-30 20:01                         ` Simon Wright
2020-06-30 20:23                           ` Luke A. Guest
2020-06-30 21:57                             ` Simon Wright
2020-06-30 23:27                               ` Luke A. Guest
2020-07-01 11:47                                 ` Simon Wright
2020-07-02  9:54                                   ` Simon Wright
2020-07-02 19:56                                     ` Optikos
2020-07-03 17:18                                     ` antispam
2020-07-03 18:31                                       ` Optikos
2020-06-24 19:18     ` Simon Wright
2020-06-24 20:06       ` Luke A. Guest
2020-06-24 20:09         ` Luke A. Guest
2020-06-25  0:33       ` Optikos
2021-02-09  4:51 ` Jerry
2021-02-09  7:07   ` Luke A. Guest
2021-02-09 12:24     ` Simon Wright
2021-02-09 18:21   ` Brian Drummond
2021-02-12 19:14     ` Andreas ZEURCHER
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox