git: f5db29b8ceb5 - stable/13 - libpmc: Use LIB_CXX instead of explicit LDADD to link a C++ library.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 02 May 2023 17:14:44 UTC
The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f5db29b8ceb59f2ebb6fb836534f5f4a770f2c65 commit f5db29b8ceb59f2ebb6fb836534f5f4a770f2c65 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2023-03-23 16:31:29 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2023-05-02 16:49:38 +0000 libpmc: Use LIB_CXX instead of explicit LDADD to link a C++ library. This uses the C++ compiler as the linker instead of the C compiler letting the compiler driver pick the right libraries. This is a no-op on main and stable/13 but matters for stable/12 where the current logic breaks for external GCC since it tries to use a non-existent libstdc++. Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39197 (cherry picked from commit c6b3f47fedd3f94f74cc4f7c40761b1d0e777f17) --- lib/libpmc/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/libpmc/Makefile b/lib/libpmc/Makefile index 2ef0d288064c..65ddb7f48b59 100644 --- a/lib/libpmc/Makefile +++ b/lib/libpmc/Makefile @@ -1,12 +1,11 @@ # $FreeBSD$ -LIB= pmc +LIB_CXX= pmc SRCS= libpmc.c pmclog.c libpmc_pmu_util.c libpmc_json.cc INCS= pmc.h pmclog.h pmcformat.h CFLAGS+= -I${SRCTOP}/${RELDIR:H}/libpmcstat -LDADD+= -lc++ .if ${MACHINE_CPUARCH} == "aarch64" EVENT_ARCH="arm64"