Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jun 2018 19:55:15 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r335645 - in head: . etc/mtree lib lib/geom sbin/geom sbin/geom/class sbin/geom/core targets/pseudo/userland targets/pseudo/userland/lib
Message-ID:  <201806251955.w5PJtFQj085862@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brooks
Date: Mon Jun 25 19:55:15 2018
New Revision: 335645
URL: https://svnweb.freebsd.org/changeset/base/335645

Log:
  Normalize the g(eom,cache,part,...) build.
  
  Rather then combining hardlink creation for the geom(8) binary with
  shared library build, move libraries to src/lib/geom so they are
  built and installed normally.  Create a common Makefile.classes
  which is included by both lib/geom/Makefile and sbin/geom/Makefile
  so the symlink and libraries stay in sync.
  
  The relocation of libraries allows libraries to be build for 32-bit
  compat.  This also reduces the number of non-standard builds in
  the system.
  
  This commit is not sufficent to run a 32-bit /sbin/geom on a 64-bit
  system out of the box as it will look in the wrong place for libraries
  unless GEOM_LIBRARY_PATH is set appropriatly in the environment.
  
  Reviewed by:	bdrewery
  Sponsored by:	DARPA, AFRL
  Differential Revision:	https://reviews.freebsd.org/D15360

Added:
  head/lib/geom/
     - copied from r335644, head/sbin/geom/class/
Deleted:
  head/sbin/geom/Makefile.inc
  head/sbin/geom/class/
  head/sbin/geom/core/Makefile
Modified:
  head/Makefile.inc1
  head/etc/mtree/BSD.lib32.dist
  head/lib/Makefile
  head/lib/geom/Makefile
  head/lib/geom/Makefile.inc
  head/sbin/geom/Makefile
  head/targets/pseudo/userland/Makefile.depend
  head/targets/pseudo/userland/lib/Makefile.depend

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1	Mon Jun 25 19:24:50 2018	(r335644)
+++ head/Makefile.inc1	Mon Jun 25 19:55:15 2018	(r335645)
@@ -952,7 +952,7 @@ _worldtmp: .PHONY
 	@touch ${WORLDTMP}/${.TARGET}
 
 .for _dir in \
-    lib lib/casper usr legacy/bin legacy/usr
+    lib lib/casper lib/geom usr legacy/bin legacy/usr
 	mkdir -p ${WORLDTMP}/${_dir}
 .endfor
 	mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
@@ -2507,6 +2507,7 @@ _prebuild_libs=	${_kerberos5_lib_libasn1} \
 		${_cddl_lib_libavl} \
 		${_cddl_lib_libzfs_core} \
 		${_cddl_lib_libctf} \
+		lib/libufs \
 		lib/libutil lib/libpjdlog ${_lib_libypclnt} lib/libz lib/msun \
 		${_secure_lib_libcrypto} ${_lib_libldns} \
 		${_secure_lib_libssh} ${_secure_lib_libssl}

Modified: head/etc/mtree/BSD.lib32.dist
==============================================================================
--- head/etc/mtree/BSD.lib32.dist	Mon Jun 25 19:24:50 2018	(r335644)
+++ head/etc/mtree/BSD.lib32.dist	Mon Jun 25 19:55:15 2018	(r335645)
@@ -8,6 +8,8 @@
     lib32
         dtrace
         ..
+        geom
+        ..
         i18n
         ..
     ..

Modified: head/lib/Makefile
==============================================================================
--- head/lib/Makefile	Mon Jun 25 19:24:50 2018	(r335644)
+++ head/lib/Makefile	Mon Jun 25 19:55:15 2018	(r335645)
@@ -24,6 +24,7 @@ SUBDIR_BOOTSTRAP= \
 
 SUBDIR=	${SUBDIR_BOOTSTRAP} \
 	.WAIT \
+	geom \
 	libalias \
 	libarchive \
 	libauditd \
@@ -100,6 +101,7 @@ SUBDIR=	${SUBDIR_BOOTSTRAP} \
 # Inter-library dependencies.  When the makefile for a library contains LDADD
 # libraries, those libraries should be listed as build order dependencies here.
 
+SUBDIR_DEPEND_geom=	libufs
 SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd
 SUBDIR_DEPEND_libauditdm= libbsm
 SUBDIR_DEPEND_libbsnmp= ${_libnetgraph}

Modified: head/lib/geom/Makefile
==============================================================================
--- head/sbin/geom/class/Makefile	Mon Jun 25 19:24:50 2018	(r335644)
+++ head/lib/geom/Makefile	Mon Jun 25 19:55:15 2018	(r335645)
@@ -1,24 +1,6 @@
 # $FreeBSD$
 
-.include <src.opts.mk>
+SUBDIR=${GEOM_CLASSES}
 
-SUBDIR=	cache
-SUBDIR+=concat
-.if ${MK_OPENSSL} != "no"
-SUBDIR+=eli
-.endif
-SUBDIR+=journal
-SUBDIR+=label
-SUBDIR+=mirror
-SUBDIR+=mountver
-SUBDIR+=multipath
-SUBDIR+=nop
-SUBDIR+=part
-SUBDIR+=raid
-SUBDIR+=raid3
-SUBDIR+=sched
-SUBDIR+=shsec
-SUBDIR+=stripe
-SUBDIR+=virstor
-
+.include "Makefile.inc"
 .include <bsd.subdir.mk>

Modified: head/lib/geom/Makefile.inc
==============================================================================
--- head/sbin/geom/class/Makefile.inc	Mon Jun 25 19:24:50 2018	(r335644)
+++ head/lib/geom/Makefile.inc	Mon Jun 25 19:55:15 2018	(r335645)
@@ -1,13 +1,16 @@
 # $FreeBSD$
 
-SHLIBDIR?=${GEOM_CLASS_DIR}
+.include <src.opts.mk>
+
+SHLIBDIR=${GEOM_CLASS_DIR}
 SHLIB_NAME?=geom_${GEOM_CLASS}.so
-LINKS=	${BINDIR}/geom ${BINDIR}/g${GEOM_CLASS}
 MAN=	g${GEOM_CLASS}.8
 SRCS+=	geom_${GEOM_CLASS}.c subr.c
+CFLAGS+=-I${SRCTOP}/sbin/geom
 
+.PATH: ${SRCTOP}/sbin/geom/misc
+
 NO_WMISSING_VARIABLE_DECLARATIONS=
 
-CFLAGS+= -I${.CURDIR:H:H}
-
+.include "Makefile.classes"
 .include "../Makefile.inc"

Modified: head/sbin/geom/Makefile
==============================================================================
--- head/sbin/geom/Makefile	Mon Jun 25 19:24:50 2018	(r335644)
+++ head/sbin/geom/Makefile	Mon Jun 25 19:55:15 2018	(r335645)
@@ -1,28 +1,30 @@
 # $FreeBSD$
 
-PACKAGE=runtime
-.if defined(RESCUE) || defined(RELEASE_CRUNCH)
+.include <src.opts.mk>
 
-.PATH:	${.CURDIR}/class/part \
-	${.CURDIR}/class/label \
-	${.CURDIR}/core \
-	${.CURDIR}/misc
+.PATH: ${.CURDIR}/core ${.CURDIR}/misc
 
-PROG=	geom
-SRCS=	geom.c geom_label.c geom_part.c subr.c
-MAN=
+PACKAGE=runtime
+PROG=		geom
+SRCS=		geom.c subr.c
+MAN=		geom.8
+CFLAGS+=	-I${.CURDIR} -I${.CURDIR}/core
+CFLAGS+=	-DGEOM_CLASS_DIR=\"${GEOM_CLASS_DIR}\"
 
-WARNS?=	2
-CFLAGS+=-I${.CURDIR} -I${.CURDIR}/core -DSTATIC_GEOM_CLASSES
+LIBADD=		geom util
 
-LIBADD=	geom util
+.if defined(RESCUE) || defined(RELEASE_CRUNCH)
+.PATH:	${SRCTOP}/lib/geom/part \
+	${SRCTOP}/lib/geom/label
 
-.include <bsd.prog.mk>
+SRCS+=	geom_label.c geom_part.c
+MAN=
 
+WARNS?=	2
+CFLAGS+=-DSTATIC_GEOM_CLASSES
 .else
-
-SUBDIR=	core class
-
-.include <bsd.subdir.mk>
-
+.include "${SRCTOP}/lib/geom/Makefile.classes"
+LINKS=		${GEOM_CLASSES:S|^|${BINDIR}/geom ${BINDIR}/g|}
 .endif
+
+.include <bsd.prog.mk>

Modified: head/targets/pseudo/userland/Makefile.depend
==============================================================================
--- head/targets/pseudo/userland/Makefile.depend	Mon Jun 25 19:24:50 2018	(r335644)
+++ head/targets/pseudo/userland/Makefile.depend	Mon Jun 25 19:55:15 2018	(r335645)
@@ -70,22 +70,6 @@ DIRDEPS+= \
 	sbin/fsdb \
 	sbin/fsirand \
 	sbin/gbde \
-	sbin/geom/class/cache \
-	sbin/geom/class/concat \
-	sbin/geom/class/eli \
-	sbin/geom/class/journal \
-	sbin/geom/class/label \
-	sbin/geom/class/mirror \
-	sbin/geom/class/mountver \
-	sbin/geom/class/multipath \
-	sbin/geom/class/nop \
-	sbin/geom/class/part \
-	sbin/geom/class/raid \
-	sbin/geom/class/raid3 \
-	sbin/geom/class/sched \
-	sbin/geom/class/shsec \
-	sbin/geom/class/stripe \
-	sbin/geom/class/virstor \
 	sbin/geom/core \
 	sbin/ggate/ggatec \
 	sbin/ggate/ggated \

Modified: head/targets/pseudo/userland/lib/Makefile.depend
==============================================================================
--- head/targets/pseudo/userland/lib/Makefile.depend	Mon Jun 25 19:24:50 2018	(r335644)
+++ head/targets/pseudo/userland/lib/Makefile.depend	Mon Jun 25 19:55:15 2018	(r335645)
@@ -8,6 +8,22 @@ DIRDEPS = \
 	lib/${CSU_DIR} \
 	lib/atf/libatf-c \
 	lib/atf/libatf-c++ \
+	lib/geom/cache \
+	lib/geom/concat \
+	lib/geom/eli \
+	lib/geom/journal \
+	lib/geom/label \
+	lib/geom/mirror \
+	lib/geom/mountver \
+	lib/geom/multipath \
+	lib/geom/nop \
+	lib/geom/part \
+	lib/geom/raid \
+	lib/geom/raid3 \
+	lib/geom/sched \
+	lib/geom/shsec \
+	lib/geom/stripe \
+	lib/geom/virstor \
 	lib/lib80211 \
 	lib/libalias/libalias \
 	lib/libalias/modules/cuseeme \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806251955.w5PJtFQj085862>