Date: Sun, 8 Jul 2018 07:42:49 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336084 - in head/stand: . efi/boot1 efi/loader i386/gptzfsboot i386/loader i386/zfsboot i386/zfsloader libsa libsa/zfs sparc64/loader sparc64/zfsloader userboot/userboot zfs zfs32 Message-ID: <201807080742.w687gnOu093835@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Sun Jul 8 07:42:49 2018 New Revision: 336084 URL: https://svnweb.freebsd.org/changeset/base/336084 Log: Move ZFS files into libsa Move the libzfs stuff into libsa. There's no need for it to be a separate library. The separate library adds to the issues of build ordering that we see from time to time. Move the filesystem support into libsa, like all the other filesystem support rather than making zfs the odd-duck out. Discussed with: allanjude@ Added: head/stand/libsa/zfs/ head/stand/libsa/zfs/Makefile.inc (contents, props changed) - copied, changed from r336080, head/stand/zfs/Makefile head/stand/libsa/zfs/devicename_stubs.c (contents, props changed) - copied, changed from r336080, head/stand/zfs/devicename_stubs.c head/stand/libsa/zfs/libzfs.h (contents, props changed) - copied, changed from r336080, head/stand/zfs/libzfs.h head/stand/libsa/zfs/zfs.c (contents, props changed) - copied, changed from r336080, head/stand/zfs/zfs.c head/stand/libsa/zfs/zfsimpl.c (contents, props changed) - copied, changed from r336080, head/stand/zfs/zfsimpl.c Deleted: head/stand/zfs/Makefile head/stand/zfs/Makefile.depend head/stand/zfs/devicename_stubs.c head/stand/zfs/libzfs.h head/stand/zfs/zfs.c head/stand/zfs/zfsimpl.c head/stand/zfs32/Makefile head/stand/zfs32/Makefile.depend Modified: head/stand/Makefile head/stand/defs.mk head/stand/efi/boot1/Makefile head/stand/efi/loader/Makefile head/stand/i386/gptzfsboot/Makefile head/stand/i386/loader/Makefile head/stand/i386/zfsboot/Makefile head/stand/i386/zfsloader/Makefile head/stand/libsa/Makefile head/stand/loader.mk head/stand/sparc64/loader/Makefile head/stand/sparc64/zfsloader/Makefile head/stand/userboot/userboot/Makefile Modified: head/stand/Makefile ============================================================================== --- head/stand/Makefile Sun Jul 8 06:50:34 2018 (r336083) +++ head/stand/Makefile Sun Jul 8 07:42:49 2018 (r336084) @@ -6,7 +6,7 @@ # others we don't. LIB32LIST is a list of libraries, which if # included, need to be built 32-bit as well. .if ${MACHINE_ARCH} == "amd64" -LIB32LIST=libsa ficl liblua zfs +LIB32LIST=libsa ficl liblua .endif S.yes+= libsa @@ -17,7 +17,6 @@ S.${MK_LOADER_LUA}+= liblua S.${MK_LOADER_LUA}+= lua S.${MK_FDT}+= fdt S.${MK_LOADER_OFW}+= ofw -S.${MK_ZFS}+= zfs S.yes+= defaults S.yes+= man Modified: head/stand/defs.mk ============================================================================== --- head/stand/defs.mk Sun Jul 8 06:50:34 2018 (r336083) +++ head/stand/defs.mk Sun Jul 8 07:42:49 2018 (r336084) @@ -28,7 +28,7 @@ LUASRC= ${SRCTOP}/contrib/lua/src SASRC= ${BOOTSRC}/libsa SYSDIR= ${SRCTOP}/sys UBOOTSRC= ${BOOTSRC}/uboot -ZFSSRC= ${BOOTSRC}/zfs +ZFSSRC= ${SASRC}/zfs BOOTOBJ= ${OBJTOP}/stand Modified: head/stand/efi/boot1/Makefile ============================================================================== --- head/stand/efi/boot1/Makefile Sun Jul 8 06:50:34 2018 (r336083) +++ head/stand/efi/boot1/Makefile Sun Jul 8 07:42:49 2018 (r336084) @@ -30,7 +30,6 @@ CFLAGS.zfs_module.c+= -I${ZFSSRC} CFLAGS.zfs_module.c+= -I${SYSDIR}/cddl/boot/zfs CFLAGS.zfs_module.c+= -I${SYSDIR}/crypto/skein CFLAGS+= -DEFI_ZFS_BOOT -LIBZFSBOOT= ${BOOTOBJ}/zfs/libzfsboot.a .endif .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} > 40201 @@ -72,8 +71,8 @@ LIBEFI= ${BOOTOBJ}/efi/libefi/libefi.a # __aeabi_* (arm) or __divdi3 (i386). # as well as required string and memory functions for all platforms. # -DPADD+= ${LIBEFI} ${LIBZFSBOOT} ${LIBSA} -LDADD+= ${LIBEFI} ${LIBZFSBOOT} ${LIBSA} +DPADD+= ${LIBEFI} ${LIBSA} +LDADD+= ${LIBEFI} ${LIBSA} DPADD+= ${LDSCRIPT} Modified: head/stand/efi/loader/Makefile ============================================================================== --- head/stand/efi/loader/Makefile Sun Jul 8 06:50:34 2018 (r336083) +++ head/stand/efi/loader/Makefile Sun Jul 8 07:42:49 2018 (r336084) @@ -25,7 +25,6 @@ SRCS= autoload.c \ vers.c .if ${MK_ZFS} != "no" -LIBZFSBOOT= ${BOOTOBJ}/zfs/libzfsboot.a CFLAGS+= -I${ZFSSRC} CFLAGS+= -DEFI_ZFS_BOOT HAVE_ZFS= yes @@ -120,8 +119,7 @@ loader.efi: ${PROG} LIBEFI= ${BOOTOBJ}/efi/libefi/libefi.a -DPADD= ${LDR_INTERP} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBZFSBOOT} ${LIBSA} \ - ${LDSCRIPT} -LDADD= ${LDR_INTERP} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBZFSBOOT} ${LIBSA} +DPADD= ${LDR_INTERP} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBSA} ${LDSCRIPT} +LDADD= ${LDR_INTERP} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBSA} .include <bsd.prog.mk> Modified: head/stand/i386/gptzfsboot/Makefile ============================================================================== --- head/stand/i386/gptzfsboot/Makefile Sun Jul 8 06:50:34 2018 (r336083) +++ head/stand/i386/gptzfsboot/Makefile Sun Jul 8 07:42:49 2018 (r336084) @@ -43,12 +43,6 @@ CFLAGS.clang+= -Wno-tentative-definition-incomplete-ty NO_WCAST_ALIGN= -.if ${MACHINE} == "amd64" -LIBZFSBOOT=${BOOTOBJ}/zfs32/libzfsboot.a -.else -LIBZFSBOOT=${BOOTOBJ}/zfs/libzfsboot.a -.endif - CFLAGS.gcc+= --param max-inline-insns-single=100 LD_FLAGS+=${LD_FLAGS_BIN} @@ -75,7 +69,7 @@ gptzfsboot.bin: gptzfsboot.out gptzfsboot.out: ${BTXCRT} zfsboot.o sio.o gpt.o drv.o cons.o \ ${OPENCRYPTO_XTS} - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBZFSBOOT} ${LIBSA32} + ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} zfsboot.o: ${ZFSSRC}/zfsimpl.c Modified: head/stand/i386/loader/Makefile ============================================================================== --- head/stand/i386/loader/Makefile Sun Jul 8 06:50:34 2018 (r336083) +++ head/stand/i386/loader/Makefile Sun Jul 8 07:42:49 2018 (r336084) @@ -71,8 +71,8 @@ FILESMODE_${LOADER}= ${BINMODE} -b # XXX crt0.o needs to be first for pxeboot(8) to work OBJS= ${BTXCRT} -DPADD= ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBSA32} -LDADD= ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBSA32} +DPADD= ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBI386} ${LIBSA32} +LDADD= ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBI386} ${LIBSA32} .if ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -DLOADER_PREFER_AMD64 Modified: head/stand/i386/zfsboot/Makefile ============================================================================== --- head/stand/i386/zfsboot/Makefile Sun Jul 8 06:50:34 2018 (r336083) +++ head/stand/i386/zfsboot/Makefile Sun Jul 8 07:42:49 2018 (r336084) @@ -37,11 +37,6 @@ CFLAGS+=-DBOOTPROG=\"zfsboot\" \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings CFLAGS.gcc+= --param max-inline-insns-single=100 -.if ${MACHINE} == "amd64" -LIBZFSBOOT=${BOOTOBJ}/zfs32/libzfsboot.a -.else -LIBZFSBOOT=${BOOTOBJ}/zfs/libzfsboot.a -.endif LD_FLAGS+=${LD_FLAGS_BIN} @@ -82,7 +77,7 @@ zfsboot.bin: zfsboot.out ${OBJCOPY} -S -O binary zfsboot.out ${.TARGET} zfsboot.out: ${BTXCRT} zfsboot.o sio.o drv.o cons.o - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBZFSBOOT} ${LIBSA32} + ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} SRCS= zfsboot.c Modified: head/stand/i386/zfsloader/Makefile ============================================================================== --- head/stand/i386/zfsloader/Makefile Sun Jul 8 06:50:34 2018 (r336083) +++ head/stand/i386/zfsloader/Makefile Sun Jul 8 07:42:49 2018 (r336084) @@ -3,5 +3,6 @@ LOADER= zfsloader NEWVERSWHAT= "ZFS enabled bootstrap loader" x86 HAVE_ZFS= yes +CFLAGS+= -DBOOTPROG=\"zfsloader\" .include "${.CURDIR}/../loader/Makefile" Modified: head/stand/libsa/Makefile ============================================================================== --- head/stand/libsa/Makefile Sun Jul 8 06:50:34 2018 (r336083) +++ head/stand/libsa/Makefile Sun Jul 8 07:42:49 2018 (r336084) @@ -155,4 +155,9 @@ SRCS+= explicit_bzero.c .include "${SASRC}/geli/Makefile.inc" .endif +# Maybe ZFS +.if ${MK_ZFS} == "yes" +.include "${SASRC}/zfs/Makefile.inc" +.endif + .include <bsd.lib.mk> Copied and modified: head/stand/libsa/zfs/Makefile.inc (from r336080, head/stand/zfs/Makefile) ============================================================================== --- head/stand/zfs/Makefile Sun Jul 8 01:29:48 2018 (r336080, copy source) +++ head/stand/libsa/zfs/Makefile.inc Sun Jul 8 07:42:49 2018 (r336084) @@ -1,20 +1,13 @@ # $FreeBSD$ -.include <bsd.init.mk> - -LIB= zfsboot - .PATH: ${ZFSSRC} SRCS+= zfs.c skein.c skein_block.c # Do not unroll skein loops, reduce code size CFLAGS+= -DSKEIN_LOOP=111 .PATH: ${SYSDIR}/crypto/skein -CFLAGS+= -DBOOTPROG=\"zfsloader\" CFLAGS+= -I${LDRSRC} CFLAGS+= -I${SYSDIR}/cddl/boot/zfs CFLAGS+= -I${SYSDIR}/crypto/skein CFLAGS+= -Wformat -Wall - -.include <bsd.lib.mk> Copied and modified: head/stand/libsa/zfs/devicename_stubs.c (from r336080, head/stand/zfs/devicename_stubs.c) ============================================================================== Copied and modified: head/stand/libsa/zfs/libzfs.h (from r336080, head/stand/zfs/libzfs.h) ============================================================================== Copied and modified: head/stand/libsa/zfs/zfs.c (from r336080, head/stand/zfs/zfs.c) ============================================================================== Copied and modified: head/stand/libsa/zfs/zfsimpl.c (from r336080, head/stand/zfs/zfsimpl.c) ============================================================================== Modified: head/stand/loader.mk ============================================================================== --- head/stand/loader.mk Sun Jul 8 06:50:34 2018 (r336083) +++ head/stand/loader.mk Sun Jul 8 07:42:49 2018 (r336084) @@ -129,13 +129,6 @@ CFLAGS+= -DLOADER_ZFS_SUPPORT CFLAGS+= -I${ZFSSRC} CFLAGS+= -I${SYSDIR}/cddl/boot/zfs SRCS+= zfs_cmd.c -.if ${MACHINE_CPUARCH} == "amd64" && ${DO32:U0} == 1 -# Have to override to use 32-bit version of zfs library... -# kinda lame to select that there XXX -LIBZFSBOOT= ${BOOTOBJ}/zfs32/libzfsboot.a -.else -LIBZFSBOOT= ${BOOTOBJ}/zfs/libzfsboot.a -.endif .endif LIBFICL= ${BOOTOBJ}/ficl/libficl.a Modified: head/stand/sparc64/loader/Makefile ============================================================================== --- head/stand/sparc64/loader/Makefile Sun Jul 8 06:50:34 2018 (r336083) +++ head/stand/sparc64/loader/Makefile Sun Jul 8 07:42:49 2018 (r336084) @@ -44,7 +44,7 @@ LDFLAGS+= -static LIBOFW= ${BOOTOBJ}/ofw/libofw/libofw.a CFLAGS+= -I${BOOTSRC}/ofw/libofw/ -DPADD= ${LDR_INTERP} ${LIBZFSBOOT} ${LIBOFW} ${LIBSA} -LDADD= ${LDR_INTERP} ${LIBZFSBOOT} ${LIBOFW} ${LIBSA} +DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBSA} +LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBSA} .include <bsd.prog.mk> Modified: head/stand/sparc64/zfsloader/Makefile ============================================================================== --- head/stand/sparc64/zfsloader/Makefile Sun Jul 8 06:50:34 2018 (r336083) +++ head/stand/sparc64/zfsloader/Makefile Sun Jul 8 07:42:49 2018 (r336084) @@ -3,5 +3,6 @@ PROG= zfsloader NEWVERSWHAT= "ZFS enabled bootstrap loader" sparc64 HAVE_ZFS= yes +CFLAGS+= -DBOOTPROG=\"zfsloader\" .include "${.CURDIR}/../loader/Makefile" Modified: head/stand/userboot/userboot/Makefile ============================================================================== --- head/stand/userboot/userboot/Makefile Sun Jul 8 06:50:34 2018 (r336083) +++ head/stand/userboot/userboot/Makefile Sun Jul 8 07:42:49 2018 (r336084) @@ -41,14 +41,13 @@ NEWVERSWHAT= "User boot" ${MACHINE_CPUARCH} .if ${MK_ZFS} != "no" CFLAGS+= -DUSERBOOT_ZFS_SUPPORT -LIBZFSBOOT= ${BOOTOBJ}/zfs/libzfsboot.a HAVE_ZFS=yes .endif # Always add MI sources .include "${BOOTSRC}/loader.mk" CFLAGS+= -I. -DPADD+= ${LDR_INTERP} ${LIBZFSBOOT} ${LIBSA} -LDADD+= ${LDR_INTERP} ${LIBZFSBOOT} ${LIBSA} +DPADD+= ${LDR_INTERP} ${LIBSA} +LDADD+= ${LDR_INTERP} ${LIBSA} .include <bsd.lib.mk>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807080742.w687gnOu093835>