Date: Fri, 29 Mar 2019 18:49:08 +0000 (UTC) From: Enji Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345709 - in head: lib/libc/tests/stdlib share/mk Message-ID: <201903291849.x2TIn8VR088066@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Fri Mar 29 18:49:08 2019 New Revision: 345709 URL: https://svnweb.freebsd.org/changeset/base/345709 Log: Allow users to override CSTD/CXXSTD on a per-prog basis The current logic for CSTD/CXXSTD requires homogenity as far as the supported C/C++ standards, which is a sensible default. However, when dealing with differing versions of C++, some code may compile with C++11, but not C++17 (for instance). So in order to avoid having people convert over their code to the new standard, give the users the ability to specify the standard on a per-program basis. This will allow a user to override the supporting standard for a set of programs, mixing C++11 with C++14 (for instance). Reviewed by: asomers Apprved by: emaste (mentor) MFC after: 1 month MFC with: r345708 Differential Revision: https://reviews.freebsd.org/D19738 Modified: head/lib/libc/tests/stdlib/Makefile head/share/mk/bsd.progs.mk Modified: head/lib/libc/tests/stdlib/Makefile ============================================================================== --- head/lib/libc/tests/stdlib/Makefile Fri Mar 29 18:45:27 2019 (r345708) +++ head/lib/libc/tests/stdlib/Makefile Fri Mar 29 18:49:08 2019 (r345709) @@ -50,8 +50,8 @@ PROGS+= h_getopt h_getopt_long CFLAGS+= -I${.CURDIR} -CXXFLAGS.cxa_thread_atexit_test+= -std=c++11 -CXXFLAGS.cxa_thread_atexit_nothr_test+= -std=c++11 +CXXSTD.cxa_thread_atexit_test= c++11 +CXXSTD.cxa_thread_atexit_nothr_test= c++11 LIBADD.cxa_thread_atexit_test+= pthread .for t in h_getopt h_getopt_long Modified: head/share/mk/bsd.progs.mk ============================================================================== --- head/share/mk/bsd.progs.mk Fri Mar 29 18:45:27 2019 (r345708) +++ head/share/mk/bsd.progs.mk Fri Mar 29 18:49:08 2019 (r345709) @@ -22,8 +22,8 @@ PROGS += ${PROGS_CXX} .if defined(PROG) # just one of many -PROG_OVERRIDE_VARS += BINDIR BINGRP BINOWN BINMODE DPSRCS MAN NO_WERROR \ - PROGNAME SRCS STRIP WARNS +PROG_OVERRIDE_VARS += BINDIR BINGRP BINOWN BINMODE CSTD CXXSTD DPSRCS MAN \ + NO_WERROR PROGNAME SRCS STRIP WARNS PROG_VARS += CFLAGS CXXFLAGS DEBUG_FLAGS DPADD INTERNALPROG LDADD LIBADD \ LINKS LDFLAGS MLINKS ${PROG_OVERRIDE_VARS} .for v in ${PROG_VARS:O:u}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903291849.x2TIn8VR088066>