svn commit: r346108 - user/ngie/fix-up-cxxstd/share/mk

John Baldwin jhb at
Tue Sep 3 14:06:42 UTC 2019

On 4/10/19 3:19 PM, Enji Cooper wrote:
> Author: ngie
> Date: Wed Apr 10 22:19:47 2019
> New Revision: 346108
> URL:
> 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

More information about the svn-src-user mailing list