Bug 260097 - MFC WITHOUT_CXX fix
Summary: MFC WITHOUT_CXX fix
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 13.0-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-29 02:16 UTC by Michael Dexter
Modified: 2021-11-29 15:24 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Dexter 2021-11-29 02:16:32 UTC
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" && \
Comment 1 Ed Maste freebsd_committer freebsd_triage 2021-11-29 15:24:26 UTC
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)