This fix applied to 14-CURRENT also applies to 13.0-STABLE as of the 2021-11-24 snapshot and fixes the WITHOUT_CXX build option: https://freshbsd.org/freebsd/src/commit/ad09e2c8cfbc2cf6f2b8826c121d6de8b3bfe96d lib/Makefile +# The libraries under libclang_rt can only be built by clang and when we enable -# sense to build when clang is enabled at all. Furthermore, they can only be +# C++ support. Furthermore, they can only be built for certain architectures. -# built for certain architectures. +.if ${COMPILER_TYPE} == "clang" && ${MK_CXX} != "no" && \
Merged: commit 7cc6e39cb6a934dea99a6aff336b353e938fbc58 Author: Ed Maste <emaste@FreeBSD.org> Date: Thu Oct 28 23:01:21 2021 -0400 Do not build libatf-c++ when WITHOUT_CXX libatf-c++ requires C++ support. From jrtc27: bit slightly odd this isn't gated by MK_TESTS (which itself depends on MK_CXX), but this makes sense given the current behaviour. Reported by: Michael Dexter, Build Option Survey Reviewed by: imp, jrtc27 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32732 (cherry picked from commit 6ce99625ca7acecaa64723f0440007eb3f60f53d) commit 8bb7b159b5b892ab8bf597203690434309691860 Author: Ed Maste <emaste@FreeBSD.org> Date: Thu Oct 28 21:43:33 2021 -0400 src.opts.mk: Add WITHOUT_CXX dependencies OFED, OPENMP, and PMC depend on C++ support. Force them off when building WITHOUT_CXX. Reported by: Michael Dexter, Build Option Survey Reviewed by: imp, jrtc27 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32730 (cherry picked from commit 0e1c864898c1803835b1be0d59342ca761051db8) commit 8f02234dbd1d578740b08afb4a0d6b877432adc9 Author: Ed Maste <emaste@FreeBSD.org> Date: Thu Oct 28 20:49:12 2021 -0400 Don't build sanitizer runtimes under WITHOUT_CXX In the past we built the sanitizer runtimes when building Clang (and using Clang as the compiler) but 7676b388adbc changed this to be conditional only on using Clang, to make the runtimes available for external Clang. They fail to build when WITHOUT_CXX is set though, so add MK_CXX as part of the condition. Reported by: Michael Dexter, Build Option Survey Reviewed by: imp, jrtc27 Fixes: 7676b388adbc ("Always build the sanitizer runtimes...") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32731 (cherry picked from commit ad09e2c8cfbc2cf6f2b8826c121d6de8b3bfe96d)