tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

minimum required -std=c++NN?



While dealing with cross-builing -current w/gcc-12 on macOS I've noticed
that we have different settings for HOST_CXXFLAGS/CXX_FLAGS in various
parts of the source tree:

src/external/mit/xorg/lib/gallium.old/Makefile:CXXFLAGS+=	-std=c++14
src/external/mit/xorg/lib/gallium/Makefile:CXXFLAGS+=	-std=c++14
src/external/apache2/llvm/Makefile.inc:HOST_CXXFLAGS+=	-std=c++14
src/external/apache2/llvm/Makefile.inc:CXXFLAGS+=	-std=c++14
src/external/gpl3/gcc/usr.bin/host-libcpp/Makefile:HOST_CXXFLAGS+=	-std=c++11
src/tests/lib/libc/sync/Makefile:CXXFLAGS+= -std=c++11
src/tests/libexec/ld.elf_so/helper_dso3/Makefile:CXXFLAGS+=	-std=c++11
src/tools/gcc/Makefile:HOST_CXXFLAGS+=		-std=c++11

I guess gallium, libc/sync and ld.elf_so aren't build as a tool.  But
the compilers are

Would it be desirable to set these to consistent values (i.e.
-stdt=c++14)?  If so, should we centralize that in a variable in
bsd.own.mk?

Also, while looking at the build logs I see during "dependall-gcc":

src/tools/gcc/../../external/gpl3/gcc/dist/libcpp/lex.cc:1289:7: warning: use of the 'likely' attribute is a C++20 extension [-Wc++20-extensions]
src/tools/gcc/../../external/gpl3/gcc/dist/libcpp/lex.cc:1289:7: warning: use of the 'likely' attribute is a C++20 extension [-Wc++20-extensions]
src/tools/gcc/../../external/gpl3/gcc/dist/libcpp/lex.cc:1289:7: warning: use of the 'likely' attribute is a C++20 extension [-Wc++20-extensions]
src/tools/gcc/../../external/gpl3/gcc/dist/libcpp/lex.cc:1289:7: warning: use of the 'likely' attribute is a C++20 extension [-Wc++20-extensions]
src/external/gpl3/gcc/dist/libcpp/lex.cc:1289:7: warning: use of the 'likely' attribute is a C++20 extension [-Wc++20-extensions]

Does that suggest we would want to set {HOST_,}CXXFLAGS to -std=c++20 for
that file or all of gcc?  (I don't see these warning during the tools
build of gcc.)

--chris



Home | Main Index | Thread Index | Old Index