From 5cf6f1c4bc281ac45ced086bc2e393f732f2fcc2 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Sat, 30 Jan 2021 17:56:35 +0000 Subject: [PATCH] Remove the MK_LIBCPLUSPLUS option This option has been equivalent to any form of C++ support since libstdc++ was removed. Therefore, replace all MK_LIBCPLUSPLUS uses with MK_CXX. Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D27974 --- Makefile.inc1 | 8 ++++---- lib/Makefile | 2 +- lib/libproc/Makefile | 4 +--- share/man/man5/src.conf.5 | 4 +--- share/mk/bsd.libnames.mk | 1 - share/mk/bsd.prog.mk | 4 ---- share/mk/src.libnames.mk | 4 ---- share/mk/src.opts.mk | 1 - tools/build/mk/OptionalObsoleteFiles.inc | 2 +- tools/build/options/WITHOUT_LIBCPLUSPLUS | 2 -- tools/build/options/WITH_LIBCPLUSPLUS | 2 -- 11 files changed, 8 insertions(+), 26 deletions(-) delete mode 100644 tools/build/options/WITHOUT_LIBCPLUSPLUS delete mode 100644 tools/build/options/WITH_LIBCPLUSPLUS diff --git a/Makefile.inc1 b/Makefile.inc1 index 6387c68d25a5..005d9d25afb3 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2867,7 +2867,7 @@ _prereq_libs+= lib/libssp_nonshared _startup_libs= lib/csu _startup_libs+= lib/libc _startup_libs+= lib/libc_nonshared -.if ${MK_LIBCPLUSPLUS} != "no" +.if ${MK_CXX} != "no" _startup_libs+= lib/libcxxrt .endif @@ -2876,7 +2876,7 @@ _startup_libs+= lib/libgcc_eh lib/libgcc_s lib/libgcc_s__L: lib/libc__L lib/libgcc_s__L: lib/libc_nonshared__L -.if ${MK_LIBCPLUSPLUS} != "no" +.if ${MK_CXX} != "no" lib/libcxxrt__L: lib/libgcc_s__L .endif @@ -2925,7 +2925,7 @@ gnu/lib/libdialog__L: lib/msun__L lib/ncurses/ncurses__L _prebuild_libs+= lib/libregex .endif -.if ${MK_LIBCPLUSPLUS} != "no" +.if ${MK_CXX} != "no" _prebuild_libs+= lib/libc++ .endif @@ -3089,7 +3089,7 @@ lib/libradius__L: lib/libmd__L lib/libproc__L: \ ${_cddl_lib_libctf:D${_cddl_lib_libctf}__L} lib/libelf__L lib/librtld_db__L lib/libutil__L -.if ${MK_CXX} != "no" && ${MK_LIBCPLUSPLUS} != "no" +.if ${MK_CXX} != "no" lib/libproc__L: lib/libcxxrt__L .endif diff --git a/lib/Makefile b/lib/Makefile index ddb627917215..48276fcd361e 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -182,7 +182,7 @@ SUBDIR.${MK_STATS}+= libstats _libclang_rt= libclang_rt .endif -.if ${MK_LIBCPLUSPLUS} != "no" +.if ${MK_CXX} != "no" _libcxxrt= libcxxrt _libcplusplus= libc++ _libcplusplus+= libc++experimental diff --git a/lib/libproc/Makefile b/lib/libproc/Makefile index 80423741e4a9..434d78bb6933 100644 --- a/lib/libproc/Makefile +++ b/lib/libproc/Makefile @@ -18,10 +18,8 @@ CFLAGS+= -I${.CURDIR} .if ${MK_CXX} == "no" CFLAGS+= -DNO_CXA_DEMANGLE -.elif ${MK_LIBCPLUSPLUS} != "no" -LIBADD+= cxxrt .else -LIBADD+= supcplusplus +LIBADD+= cxxrt .endif LIBADD+= elf procstat rtld_db util diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 0e853db0d1bc..81656db323ed 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd January 30, 2021 +.Dd February 1, 2021 .Dt SRC.CONF 5 .Os .Sh NAME @@ -859,8 +859,6 @@ runtime linker. .Pp This is a default setting on arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mips, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. -.It Va WITHOUT_LIBCPLUSPLUS -Set to avoid building libcxxrt and libc++. .It Va WITH_LIBSOFT On armv6 only, set to enable soft float ABI compatibility libraries. This option is for transitioning to the new hard float ABI. diff --git a/share/mk/bsd.libnames.mk b/share/mk/bsd.libnames.mk index d030292d3c5e..7f591d3fd3f7 100644 --- a/share/mk/bsd.libnames.mk +++ b/share/mk/bsd.libnames.mk @@ -141,7 +141,6 @@ LIBSPL?= ${LIBDESTDIR}${LIBDIR_BASE}/libspl.a LIBSSL?= ${LIBDESTDIR}${LIBDIR_BASE}/libssl.a LIBSSP_NONSHARED?= ${LIBDESTDIR}${LIBDIR_BASE}/libssp_nonshared.a LIBSTATS?= ${LIBDESTDIR}${LIBDIR_BASE}/libstats.a -LIBSTDCPLUSPLUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libstdc++.a LIBSTDTHREADS?= ${LIBDESTDIR}${LIBDIR_BASE}/libstdthreads.a LIBSYSDECODE?= ${LIBDESTDIR}${LIBDIR_BASE}/libsysdecode.a LIBTACPLUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libtacplus.a diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 5e7aaaeb37f8..44a774957cfb 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -261,11 +261,7 @@ _EXTRADEPEND: .else echo ${PROG_FULL}: ${LIBC} ${DPADD} >> ${DEPENDFILE} .if defined(PROG_CXX) -.if ${COMPILER_TYPE} == "clang" && empty(CXXFLAGS:M-stdlib=libstdc++) echo ${PROG_FULL}: ${LIBCPLUSPLUS} >> ${DEPENDFILE} -.else - echo ${PROG_FULL}: ${LIBSTDCPLUSPLUS} >> ${DEPENDFILE} -.endif .endif .endif .endif # !defined(NO_EXTRADEPEND) diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 32cd1677bcd4..1d3195f53eb1 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -298,11 +298,7 @@ _DP_radius= crypto _DP_rtld_db= elf procstat _DP_procstat= kvm util elf .if ${MK_CXX} == "yes" -.if ${MK_LIBCPLUSPLUS} != "no" _DP_proc= cxxrt -.else -_DP_proc= supcplusplus -.endif .endif .if ${MK_CDDL} != "no" _DP_proc+= ctf diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index e531916b5976..d3f7e33f276c 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -125,7 +125,6 @@ __DEFAULT_YES_OPTIONS = \ LDNS \ LDNS_UTILS \ LEGACY_CONSOLE \ - LIBCPLUSPLUS \ LLD \ LLD_BOOTSTRAP \ LLD_IS_LD \ diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 4a075a78cf70..87fab14e45e7 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -3793,7 +3793,7 @@ OLD_LIBS+=${DEBUG_LIB32_LIBS} . endif .endif -.if ${MK_LIBCPLUSPLUS} == no +.if ${MK_CXX} == no OLD_LIBS+=lib/libcxxrt.so.1 OLD_FILES+=usr/lib/libc++.a OLD_FILES+=usr/lib/libc++_p.a diff --git a/tools/build/options/WITHOUT_LIBCPLUSPLUS b/tools/build/options/WITHOUT_LIBCPLUSPLUS deleted file mode 100644 index 2449e30d4b10..000000000000 --- a/tools/build/options/WITHOUT_LIBCPLUSPLUS +++ /dev/null @@ -1,2 +0,0 @@ -.\" $FreeBSD$ -Set to avoid building libcxxrt and libc++. diff --git a/tools/build/options/WITH_LIBCPLUSPLUS b/tools/build/options/WITH_LIBCPLUSPLUS deleted file mode 100644 index 0f30dd8c1e4f..000000000000 --- a/tools/build/options/WITH_LIBCPLUSPLUS +++ /dev/null @@ -1,2 +0,0 @@ -.\" $FreeBSD$ -Set to build libcxxrt and libc++.