[llvm-dev] Using C++14 code in LLVM

Zachary Turner via llvm-dev llvm-dev at lists.llvm.org
Sun Oct 2 16:09:08 PDT 2016


The BSDs don't seem as much of an issue.  FreeBSD 10 and 11 both have LLVM
3.9 and GCC 4.9.  NetBSD 6.1.5 and 7.0 both have GCC 5.3 and LLVM 3.8.
Open BSD has a very old GCC, but distrowatch claims that it also has LLVM
3.8.

Going back to what Joerg said earlier.
http://distrowatch.com/table.php?distribution=netbsd says NetBSD 7 ships
with GCC 5.3, but Joerg said 4.8.  Which is it?  And even if it's 4.8, the
same page also says NetBSD has LLVM 3.8.  Is that not sufficient?

BTW, CentOS and OpenSUSE have pre-built binaries for LLVM in the installer,
so that won't require a full bootstrap if someone wanted to get a modern
toolchain capable of building LLVM.

On Sun, Oct 2, 2016 at 1:48 PM Renato Golin via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> On 2 October 2016 at 18:07, Pete Cooper via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > I haven't been following C++14 closely, but from hallway conversations
> at work it seems like 17 is the bigger win in terms of features.
> >
> > Is it worth waiting for 17 instead? Or, as we will only get a subset of
> 14 features anyway, just instead take a subset of 17 features?
>
> I believe C++14 has enough C++11 bug fixes to be worth moving to.
>
>
> > Finally, I think we have clang 3.1 as the min version. Anyone know what
> that minimum will move to for the 14 support needed? I don't think it's as
> much of an issue as most distros are gcc based, but still good to know.
>
> We'd have to bump it, but as Zach said, Clang 3.4 has all the
> features, so that should be fine.
>
> According to DistroWatch, these are the distros that have 4.9 or higher:
>
> Mint 18 [2016-06]
> Ubuntu Utopic [2014-10] (14.10, current 16.04 LTS)
> Debian Jessie [2015-04] (8.0 stable, current)
> Fedora 21 [2014-12] (current stable: 24)
> Slackware 14.2 [2016-07]
>
> And these are the ones that dont:
>
> RedHat (latest is 4.8.5)
> OpenSUSE (latest stable is 4.8)
> SLES (latest stable is 4.8.5)
> CentOS (latest stable is 4.8.5)
>
> So, it's pretty clear that, even if the compiler is 2 or 4 years old,
> the distributions are only picking up now and commercially-focused
> distributions haven't got there yet.
>
> Based on those numbers, I'd say 4.8 is a good minimum for now. The
> BSDs seem to be in a similar conundrum, so it would be pretty bad to
> move the requirement to 4.9 and forcing large swaths of people to
> manually download / compile their toolchains.
>
> Clang may work natively, but it definitely doesn't work cross-compiled
> our of the box, and sometimes not at all. It also needs binutils and
> glibc support, which we're not even considering here.
>
> On Linux, GNU compatibility is important, and even if we had a full
> toolchain (using rt, libc++, lld, musl/newlib, etc), we'd still need
> to be compatible with GNU objects, shared libraries, etc.
>
> I like using new C++14 features just as much as the next guy, but I
> prefer to have a stable and usable environment more.
>
> cheers,
> --renato
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161002/b8252952/attachment.html>


More information about the llvm-dev mailing list