From e221444208b601d6ab8d0bfb8453aa1b0bb138f3 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 1 Feb 2024 11:58:29 -0800 Subject: [PATCH] Reduce diffs ZFS build infrastructure and src.libnames.mk This reverts commits 0cbe25cb42adedfe1d5549ddf1ae137c1aa07f80 and eb15e17653da2864461eef66fed2f89501a9e396. --- cddl/lib/Makefile | 2 +- cddl/lib/libavl/Makefile | 3 +-- cddl/lib/libuutil/Makefile | 6 ------ share/mk/src.libnames.mk | 20 ++++++++------------ 4 files changed, 10 insertions(+), 21 deletions(-) diff --git a/cddl/lib/Makefile b/cddl/lib/Makefile index aa3648ff480c..68250c8300b1 100644 --- a/cddl/lib/Makefile +++ b/cddl/lib/Makefile @@ -28,7 +28,7 @@ SUBDIR.${MK_ZFS}+= \ SUBDIR.${MK_ZFS}.${MK_OPENSSL} = pam_zfs_key -SUBDIR_DEPEND_libavl= libnvpair libspl +SUBDIR_DEPEND_libavl= libspl SUBDIR_DEPEND_libctf= libspl SUBDIR_DEPEND_libdtrace= libctf SUBDIR_DEPEND_libnvpair= libspl diff --git a/cddl/lib/libavl/Makefile b/cddl/lib/libavl/Makefile index 4b85a6450fc8..1ed740ef793c 100644 --- a/cddl/lib/libavl/Makefile +++ b/cddl/lib/libavl/Makefile @@ -3,8 +3,7 @@ PACKAGE= zfs LIB= avl -# The assert macro needs `int aok` (which is in nvpair) -LIBADD= nvpair spl +LIBADD= spl SRCS= avl.c WARNS?= 3 CFLAGS+= -DIN_BASE diff --git a/cddl/lib/libuutil/Makefile b/cddl/lib/libuutil/Makefile index 7d329c26a605..3250a58378f4 100644 --- a/cddl/lib/libuutil/Makefile +++ b/cddl/lib/libuutil/Makefile @@ -22,10 +22,4 @@ CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h LIBADD= avl spl -# The aok vairable used by assert() is defined in -# sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair.c so we need -# to link against nvpair in order to get size information for that file -# (at least for purecap) -LIBADD+= nvpair - .include diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 86361634e3be..da3d8dc3b9b8 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -2,7 +2,7 @@ # The include file define library names suitable # for INTERNALLIB and PRIVATELIB definition -.if !target(____) && !target(____) +.if !target(____) .error src.libnames.mk cannot be included directly. .endif @@ -41,6 +41,7 @@ _PRIVATELIBS+= ${LOCAL_PRIVATELIBS} _INTERNALLIBS= \ amu \ + bsnmptools \ c_nossp_pic \ cron \ elftc \ @@ -83,10 +84,6 @@ _INTERNALLIBS= \ wpautils \ wpawps -.if ${MK_BSNMP} == "yes" -_INTERNALLIBS+= bsnmptools -.endif - # Let projects based on FreeBSD append to _INTERNALLIBS # by maintaining their own LOCAL_INTERNALLIBS list. _INTERNALLIBS+= ${LOCAL_INTERNALLIBS} @@ -289,7 +286,7 @@ _DP_9p+= casper cap_pwd cap_grp .if ${.MAKE.OS} == "FreeBSD" || !defined(BOOTSTRAPPING) _DP_archive= z bz2 lzma bsdxml zstd .endif -_DP_avl= nvpair spl +_DP_avl= spl _DP_bsddialog= formw ncursesw tinfow _DP_zstd= pthread .if ${MK_BLACKLIST} != "no" @@ -424,7 +421,7 @@ _DP_ulog= md _DP_fifolog= z _DP_ipf= kvm _DP_tpool= spl -_DP_uutil= avl nvpair spl +_DP_uutil= avl spl _DP_zfs= md pthread rt umem util uutil m avl bsdxml crypto geom nvpair \ z zfs_core zutil _DP_zfsbootenv= zfs nvpair @@ -449,8 +446,8 @@ _DP_mlx4= ibverbs pthread _DP_mlx5= ibverbs pthread _DP_rdmacm= ibverbs _DP_osmcomp= pthread -_DP_opensm= pthread osmcomp -_DP_osmvendor= ibumad pthread osmcomp +_DP_opensm= pthread +_DP_osmvendor= ibumad pthread .endif # Define special cases @@ -620,7 +617,6 @@ LIBFIFOLOG?= ${LIBFIFOLOGDIR}/libfifolog${PIE_SUFFIX}.a LIBBSNMPTOOLSDIR= ${_LIB_OBJTOP}/usr.sbin/bsnmpd/tools/libbsnmptools LIBBSNMPTOOLS?= ${LIBBSNMPTOOLSDIR}/libbsnmptools${PIE_SUFFIX}.a -LIBBEDIR= ${_LIB_OBJTOP}/lib/libbe LIBBE?= ${LIBBEDIR}/libbe${PIE_SUFFIX}.a LIBPMCSTATDIR= ${_LIB_OBJTOP}/lib/libpmcstat @@ -798,8 +794,8 @@ _BADLIBADD+= ${_l} .endif # Note that OBJTOP is not yet defined here but for the purpose of the check # it is fine as it resolves to the SRC directory. -.if !defined(LIB${LIB:tu}DIR) || !exists(${SRCTOP}/${LIB${LIB:tu}DIR:S,^${_LIB_OBJTOP}/,,}) -.error ${.CURDIR}: Missing or incorrect value for LIB${LIB:tu}DIR in ${_this:T}: ${LIB${LIB:tu}DIR:S,^${_LIB_OBJTOP}/,,} +.if !defined(LIB${LIB:tu}DIR) || !exists(${SRCTOP}/${LIB${LIB:tu}DIR:S,^${OBJTOP}/,,}) +.error ${.CURDIR}: Missing or incorrect value for LIB${LIB:tu}DIR in ${_this:T}: ${LIB${LIB:tu}DIR:S,^${OBJTOP}/,,} .endif .if ${_INTERNALLIBS:M${LIB}} != "" && !defined(LIB${LIB:tu}) .error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${LIB${LIB:tu}DIR}/lib${LIB}.a