LLVM 9 versus LLVM 8

Polytropon freebsd at edvax.de
Tue Nov 19 05:27:18 UTC 2019

On Mon, 18 Nov 2019 22:15:00 -0500, Joe A. wrote:
> My current machine's state:
> FreeBSD 12.0-RELEASE-p11 r354060 CHTHONIXIA  amd64
> Recently, LLVM was updated to version 9. I do not recall why; but I think 
> some port required version 9. Since 9 appeared to become the default 
> version I deinstalled 8, assuming LLVM 9 was preferred.
> But now I'm not sure if LLVM 9 was set to the default version for 
> Freebsd, or even if it is needed. 
> Now I need to update firefox, which attempts to install LLVM 8. 
> Can I dispense with LLVM 9 by a deinstall, and depend on LLVM 8 for a 
> functioning, X-enabled, desktop? Or must I have both LLVM 8 and 9 as 
> things stand now for 12.1?

If I understand things correctly, situation is the following:

The OS compiler, needed by the OS, primarily for updating from
/usr/src, is the newer LLVM version, bundled with the install.
A renewal of the OS build process might force a higher version
of the compiler, for example, by obtaining its sources, building
it, and then using it to build further sources ("self-hosting").
This is the compiler that will be used whenever you call "cc"
without being more specific.

The Firefox port defines the older LLVM version as a build
dependency, required for _building_ (not _running_) the port.
So it will install it whenever it's missing. The port will use
the compiler that it requires (after making it available by
installing it as a build dependency and then returning to its
own build process).

So in the end, you have one compiler in the OS (default one),
and one compiler as 3rd party software. You could of couse
have even more compilers, for example, more than one GCC version
installed by ports that require them for building... :-)

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list