emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Contributing LLVM.org patches to gud.el


From: Perry E. Metzger
Subject: Re: Contributing LLVM.org patches to gud.el
Date: Mon, 9 Feb 2015 15:04:11 -0500

On Sat, 7 Feb 2015 19:15:27 -0500 "Eric S. Raymond" <address@hidden>
wrote:
> Richard Stallman <address@hidden>:
> > More precisely, Apple intends LLVM and Clang to make GCC cease to
> > be a signal success and a reason for all sorts of companies to
> > work on a compiler that always gives users freedom.
> 
> This is silly.  Apple couldn't care less whether or not GCC is a
> success. What Apple needs is for a copylefted compiler not to be
> the *only* success.

I should like to correct a partial misperception here.

I don't think Apple's main motivation was to have a proprietary
compiler. On a purely technical level, LLVM makes lots of things
possible that Apple needed that GCC does not allow.

LLVM, for example, interfaces well to IDEs and refactoring tools,
which Apple needed, and now has built into XCode -- though note that
the support on the LLVM side is in the free software LLVM tree and is
in no way proprietary, and free software IDEs can make full use of
those interfaces. For another example, LLVM is modular so it is
possible to use it in producing static analysis tools, which Apple
needed, and are now built -- but again those analysis tools are in the
free software LLVM tree, not in a proprietary Apple tree, and may be
modified and incorporated into free software projects.

LLVM was created in academia, not by Apple, and it was specifically a
response to the fact that academics working on language tool and
compiler research simply couldn't manage to use GCC to get their work
done.  They wanted to do research on things like static analysis
tools, code transformation tools, link-time optimization, JITs, etc.,
and GCC deliberately makes it hard to use its pieces in such projects,
so they needed to build their own.

I myself use LLVM and not GCC for my academic research, which is
because my work is too difficult to do in GCC and very easy to do
under LLVM.

So to reiterate: LLVM was created because of GCC's deliberately
non-modular, non-reusable architecture, and not because GCC
was GPLed. The fact that LLVM is not GPLed and permits proprietary
forks is a side effect of the history (and potentially a very bad one)
but was not what caused LLVM to come about to begin with.

I think the lesson we can all draw is that architectural decisions
made for political strategy reasons are of limited utility.
Eventually, code designed for technical superiority will
become more popular than code with features missing for "strategic
reasons". If you want the more popular code to be free software, and
if you want it to be GPLed software, then you must assure that your
alternative is technically as good as it can be and suits the needs of
its users as well as it can.

As I understand it, the goal of making GCC non-modular was to prevent
the use of GCC to write proprietary front and back ends that do not
link directly to GCC. However, if GCC had been modular, it would have
been the focus of all the academic research, and all the tools built
on top would have been linked against GCC and thus would also have
been GPLed. In addition, Dragon Egg demonstrated that GCC could be
used as the front end to an LLVM compiler in spite of the
strategy. Also in addition, the non-modularity has not prevented the
creation of top quality proprietary front and back ends anyway, since
they can now be based on LLVM, which is arguably technically superior
to GCC at this point anyway and which permits that without much
trouble.

So again, I think if technical merit had been picked over "strategic
considerations", the strategic considerations would have been better
served.


Perry
-- 
Perry E. Metzger                address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]