mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
Previously the compiler's default C++ standard was used unlike C where bsd.sys.mk explicitly sets a default language version. Setting an explicit default version will give a more uniform experience across different compilers and compiler versions. gnu++17 was chosen to match the default C standard. It is well supported by a wide range of clang (5+) and GCC (9+) versions. gnu++17 is also the default C++ standard in recent versions of clang (16+) and GCC (11+). As a result, many of the explicit CXXSTD settings in Makefiles had the effect of lowering the C++ standard instead of raising it as was originally intended and are removed. Note that the remaining explicit CXXSTD settings for atf and liblutok explicitly lower the standard to C++11 due to use of the deprecated auto_ptr<> template which is removed in later versions. Reviewed by: imp, asomers, dim, emaste Differential Revision: https://reviews.freebsd.org/D49223
36 lines
719 B
Makefile
36 lines
719 B
Makefile
.include <bsd.compiler.mk>
|
|
|
|
PACKAGE= clang
|
|
CRTSRC= ${SRCTOP}/contrib/llvm-project/compiler-rt
|
|
.include "compiler-rt-vars.mk"
|
|
|
|
.PATH: ${CRTSRC}/lib
|
|
|
|
LIBDIR= ${SANITIZER_LIBDIR}
|
|
SHLIBDIR= ${LIBDIR}
|
|
|
|
NO_PIC=
|
|
MK_ASAN:= no
|
|
MK_SSP= no
|
|
MK_UBSAN:= no
|
|
|
|
WARNS?= 0
|
|
|
|
CFLAGS+= -DNDEBUG
|
|
CFLAGS+= -DHAVE_RPC_XDR_H=0
|
|
CFLAGS+= -DSANITIZER_SUPPORTS_WEAK_HOOKS=0
|
|
CFLAGS+= -DUBSAN_CAN_USE_CXXABI
|
|
CFLAGS+= ${PICFLAG}
|
|
CFLAGS+= -fno-builtin
|
|
CFLAGS+= -fno-exceptions
|
|
CXXFLAGS+= -fno-rtti
|
|
.if ${COMPILER_TYPE} == clang
|
|
CFLAGS+= -fno-sanitize=safe-stack
|
|
.endif
|
|
CFLAGS+= -fno-stack-protector
|
|
CFLAGS+= -funwind-tables
|
|
CXXFLAGS+= -fvisibility-inlines-hidden
|
|
CXXFLAGS+= -fvisibility=hidden
|
|
CFLAGS+= -I${CRTSRC}/include
|
|
CFLAGS+= -I${CRTSRC}/lib
|