Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Sep 2019 14:06:42 -0000
From:      John Baldwin <jhb@FreeBSD.org>
To:        Enji Cooper <ngie@FreeBSD.org>, src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   Re: svn commit: r346108 - user/ngie/fix-up-cxxstd/share/mk
Message-ID:  <c293316b-c680-5200-0aa1-7fa18a358565@FreeBSD.org>
In-Reply-To: <201904102219.x3AMJlRu006058@repo.freebsd.org>
References:  <201904102219.x3AMJlRu006058@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 4/10/19 3:19 PM, Enji Cooper wrote:
> Author: ngie
> Date: Wed Apr 10 22:19:47 2019
> New Revision: 346108
> URL: https://svnweb.freebsd.org/changeset/base/346108
> 
> Log:
>   Rework r345708
>   
>   * Default to gnu++14 with clang++ and g++ 6.x+ according to the defaults of
>     each compile toolchain.
>   * Do not override user-specified values for `-std=*`. Some ports rely on this
>     functionality.
>   
>   This patch is similar to the one submitted by jbeich, however, it aims to
>   optimize the latter case by not testing the compiler version, etc, at all.
>   
>   Reported by:	jbeich

One thing I don't understand is why we'd set the value to the default value.
If we want to use the compiler's default it seems like we should just not set
the flag at all.  Trying to keep the list in sync across compiler versions
seems fragile.  If, OTOH, we want to ensure that FreeBSD only uses C++11 so that
in theory any C++11 compiler can compile it, then forcing C++11 even on newer
compilers as the original change did would seem to make sense (and seems to be
a legitimate reason to force -std).  However, trying to just match the compiler's
default seems to be a giant NOP, but one that requires ongoing maintenance.  Can
you describe the goal of what the -std changes are trying to do?

-- 
John Baldwin





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c293316b-c680-5200-0aa1-7fa18a358565>