Date: Mon, 9 Oct 2017 22:12:47 +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: r324452 - in head/sys/boot: . arm/uboot efi/boot1 efi/loader i386/gptboot i386/gptzfsboot i386/loader i386/zfsboot mips/beri/boot2 mips/beri/loader mips/uboot powerpc/kboot powerpc/ofw ... Message-ID: <201710092212.v99MClEC011111@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Mon Oct 9 22:12:46 2017 New Revision: 324452 URL: https://svnweb.freebsd.org/changeset/base/324452 Log: Define LIBSA* and use them instead of overloaded LIBSTAND LIBSA is the current stand alone library. LIBSA32 is the 32-bit version of the library. LIBSAU is the userboot version of libsa. Use the proper define instead of the more generic define. Sponsored by: Netflix Modified: head/sys/boot/Makefile.inc head/sys/boot/arm/uboot/Makefile head/sys/boot/efi/boot1/Makefile head/sys/boot/efi/loader/Makefile head/sys/boot/i386/gptboot/Makefile head/sys/boot/i386/gptzfsboot/Makefile head/sys/boot/i386/loader/Makefile head/sys/boot/i386/zfsboot/Makefile head/sys/boot/mips/beri/boot2/Makefile head/sys/boot/mips/beri/loader/Makefile head/sys/boot/mips/uboot/Makefile head/sys/boot/powerpc/kboot/Makefile head/sys/boot/powerpc/ofw/Makefile head/sys/boot/powerpc/ps3/Makefile head/sys/boot/powerpc/uboot/Makefile head/sys/boot/sparc64/loader/Makefile head/sys/boot/userboot/userboot/Makefile Modified: head/sys/boot/Makefile.inc ============================================================================== --- head/sys/boot/Makefile.inc Mon Oct 9 22:12:39 2017 (r324451) +++ head/sys/boot/Makefile.inc Mon Oct 9 22:12:46 2017 (r324452) @@ -6,6 +6,12 @@ __BOOT_MAKEFILE_INC__=${MFILE} SASRC=${SRCTOP}/lib/libstand +# Normal stand alone library +LIBSA=${OBJTOP}/lib/libstand/libstand.a +# stand alone library compiled for 32-bit version of the processor +LIBSA32=${OBJTOP}/sys/boot/libstand32/libstand.a +# stand along library compiled for userboot +LIBSAU=${OBJTOP}/sys/boot/userboot/libstand/libstand.a SSP_CFLAGS= Modified: head/sys/boot/arm/uboot/Makefile ============================================================================== --- head/sys/boot/arm/uboot/Makefile Mon Oct 9 22:12:39 2017 (r324451) +++ head/sys/boot/arm/uboot/Makefile Mon Oct 9 22:12:46 2017 (r324452) @@ -112,7 +112,6 @@ LIBUBOOT= ${.OBJDIR}/../../uboot/lib/libuboot.a CFLAGS+= -I${.CURDIR}/../../uboot/lib CFLAGS+= -I${.OBJDIR}/../../uboot/lib -# where to get libstand from CFLAGS+= -I${SASRC} CFLAGS+= -fPIC @@ -120,8 +119,8 @@ CFLAGS+= -fPIC # clang doesn't understand %D as a specifier to printf NO_WERROR.clang= -DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSTAND} +DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA} +LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA} OBJS+= ${SRCS:N*.h:R:S/$/.o/g} Modified: head/sys/boot/efi/boot1/Makefile ============================================================================== --- head/sys/boot/efi/boot1/Makefile Mon Oct 9 22:12:39 2017 (r324451) +++ head/sys/boot/efi/boot1/Makefile Mon Oct 9 22:12:46 2017 (r324452) @@ -90,8 +90,8 @@ LIBEFI= ${.OBJDIR}/../libefi/libefi.a # __aeabi_* (arm) or __divdi3 (i386). # as well as required string and memory functions for all platforms. # -DPADD+= ${LIBEFI} ${LIBSTAND} -LDADD+= ${LIBEFI} ${LIBSTAND} +DPADD+= ${LIBEFI} ${LIBSA} +LDADD+= ${LIBEFI} ${LIBSA} DPADD+= ${LDSCRIPT} Modified: head/sys/boot/efi/loader/Makefile ============================================================================== --- head/sys/boot/efi/loader/Makefile Mon Oct 9 22:12:39 2017 (r324451) +++ head/sys/boot/efi/loader/Makefile Mon Oct 9 22:12:46 2017 (r324452) @@ -150,9 +150,9 @@ loader.efi: ${PROG} LIBEFI= ${.OBJDIR}/../libefi/libefi.a -DPADD= ${LIBFICL} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBSTAND} \ +DPADD= ${LIBFICL} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBSA} \ ${LDSCRIPT} -LDADD= ${LIBFICL} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBSTAND} +LDADD= ${LIBFICL} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBSA} .include <bsd.prog.mk> Modified: head/sys/boot/i386/gptboot/Makefile ============================================================================== --- head/sys/boot/i386/gptboot/Makefile Mon Oct 9 22:12:39 2017 (r324451) +++ head/sys/boot/i386/gptboot/Makefile Mon Oct 9 22:12:46 2017 (r324452) @@ -50,8 +50,6 @@ OPENCRYPTO_XTS= xform_aes_xts.o LD_FLAGS=${LD_FLAGS_BIN} -LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a - # Pick up ../Makefile.inc early. .include <bsd.init.mk> @@ -76,7 +74,7 @@ gptboot.bin: gptboot.out ${OBJCOPY} -S -O binary gptboot.out ${.TARGET} gptboot.out: ${BTXCRT} gptboot.o sio.o crc32.o drv.o cons.o util.o ${OPENCRYPTO_XTS} - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBGELIBOOT} ${LIBSTAND} + ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBGELIBOOT} ${LIBSA32} gptboot.o: ${.CURDIR}/../../common/ufsread.c Modified: head/sys/boot/i386/gptzfsboot/Makefile ============================================================================== --- head/sys/boot/i386/gptzfsboot/Makefile Mon Oct 9 22:12:39 2017 (r324451) +++ head/sys/boot/i386/gptzfsboot/Makefile Mon Oct 9 22:12:46 2017 (r324452) @@ -60,8 +60,6 @@ CFLAGS.gcc+= --param max-inline-insns-single=100 LD_FLAGS=${LD_FLAGS_BIN} -LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a - # Pick up ../Makefile.inc early. .include <bsd.init.mk> @@ -87,7 +85,7 @@ gptzfsboot.bin: gptzfsboot.out gptzfsboot.out: ${BTXCRT} zfsboot.o sio.o gpt.o drv.o cons.o util.o \ skein.o skein_block.o ${OPENCRYPTO_XTS} - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBGELIBOOT} ${LIBSTAND} + ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBGELIBOOT} ${LIBSA32} zfsboot.o: ${.CURDIR}/../../zfs/zfsimpl.c Modified: head/sys/boot/i386/loader/Makefile ============================================================================== --- head/sys/boot/i386/loader/Makefile Mon Oct 9 22:12:39 2017 (r324451) +++ head/sys/boot/i386/loader/Makefile Mon Oct 9 22:12:46 2017 (r324452) @@ -90,8 +90,6 @@ LDFLAGS= -static -Ttext 0x0 LIBI386= ${.OBJDIR}/../libi386/libi386.a CFLAGS+= -I${.CURDIR}/.. -LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a - # BTX components CFLAGS+= -I${.CURDIR}/../btx/lib @@ -127,8 +125,8 @@ FILES+= loader.rc menu.rc # XXX crt0.o needs to be first for pxeboot(8) to work OBJS= ${BTXCRT} -DPADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSTAND} +DPADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSA32} +LDADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSA32} .include <bsd.prog.mk> Modified: head/sys/boot/i386/zfsboot/Makefile ============================================================================== --- head/sys/boot/i386/zfsboot/Makefile Mon Oct 9 22:12:39 2017 (r324451) +++ head/sys/boot/i386/zfsboot/Makefile Mon Oct 9 22:12:46 2017 (r324452) @@ -40,8 +40,6 @@ CFLAGS+= -DSKEIN_LOOP=111 LD_FLAGS=${LD_FLAGS_BIN} -LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a - # Pick up ../Makefile.inc early. .include <bsd.init.mk> @@ -83,7 +81,7 @@ zfsboot.bin: zfsboot.out ${OBJCOPY} -S -O binary zfsboot.out ${.TARGET} zfsboot.out: ${BTXCRT} zfsboot.o sio.o drv.o cons.o util.o skein.o skein_block.o - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} + ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} SRCS= zfsboot.c Modified: head/sys/boot/mips/beri/boot2/Makefile ============================================================================== --- head/sys/boot/mips/beri/boot2/Makefile Mon Oct 9 22:12:39 2017 (r324451) +++ head/sys/boot/mips/beri/boot2/Makefile Mon Oct 9 22:12:46 2017 (r324452) @@ -59,7 +59,6 @@ CFLAGS= -ffreestanding \ # where to get libstand from CFLAGS+= -I${SASRC} -LIBSTAND= ${.OBJDIR}/../../../../../lib/libstand/libstand.a LDFLAGS= -nostdlib \ -static \ @@ -72,7 +71,7 @@ CFLAGS+= -I${.CURDIR}/../common flashboot.elf: relocate.o start.o boot2.o altera_jtag_uart.o cfi.o sdcard.o ${CC} ${LDFLAGS} -T ${.CURDIR}/flashboot.ldscript -o ${.TARGET} \ - ${.ALLSRC} ${LIBSTAND} + ${.ALLSRC} ${LIBSA} flashboot: flashboot.elf ${OBJCOPY} -S -O binary ${.TARGET}.elf ${.TARGET} flashboot.md5: flashboot @@ -80,7 +79,7 @@ flashboot.md5: flashboot jtagboot: start.o boot2.o altera_jtag_uart.o cfi.o sdcard.o ${CC} ${LDFLAGS} -T ${.CURDIR}/jtagboot.ldscript -o ${.TARGET} \ - ${.ALLSRC} ${LIBSTAND} + ${.ALLSRC} ${LIBSA} jtagboot.md5: jtagboot md5 jtagboot > jtagboot.md5 Modified: head/sys/boot/mips/beri/loader/Makefile ============================================================================== --- head/sys/boot/mips/beri/loader/Makefile Mon Oct 9 22:12:39 2017 (r324451) +++ head/sys/boot/mips/beri/loader/Makefile Mon Oct 9 22:12:46 2017 (r324452) @@ -109,10 +109,9 @@ LDFLAGS= -nostdlib \ # where to get libstand from CFLAGS+= -I${SASRC} -LIBSTAND= ${.OBJDIR}/../../../../../lib/libstand/libstand.a -DPADD= ${LIBFICL} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBSTAND} +DPADD= ${LIBFICL} ${LIBSA} +LDADD= ${LIBFICL} ${LIBSA} loader.help: help.common help.mips cat ${.ALLSRC} | \ Modified: head/sys/boot/mips/uboot/Makefile ============================================================================== --- head/sys/boot/mips/uboot/Makefile Mon Oct 9 22:12:39 2017 (r324451) +++ head/sys/boot/mips/uboot/Makefile Mon Oct 9 22:12:46 2017 (r324452) @@ -117,14 +117,13 @@ CFLAGS+= -I${.OBJDIR}/../../uboot/lib # where to get libstand from CFLAGS+= -I${SASRC} -LIBSTAND= ${.OBJDIR}/../../../../lib/libstand/libstand.a # clang doesn't understand %D as a specifier to printf #NO_WERROR.clang= #NO_WERROR= -DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSTAND} +DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA} +LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA} OBJS+= ${SRCS:N*.h:R:S/$/.o/g} Modified: head/sys/boot/powerpc/kboot/Makefile ============================================================================== --- head/sys/boot/powerpc/kboot/Makefile Mon Oct 9 22:12:39 2017 (r324451) +++ head/sys/boot/powerpc/kboot/Makefile Mon Oct 9 22:12:46 2017 (r324452) @@ -94,11 +94,10 @@ CFLAGS+= -Wa,-mppc64bridge #.include "${.CURDIR}/../../ofw/common/Makefile.inc" # where to get libstand from -LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a CFLAGS+= -I${SASRC} -DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND} +DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32} +LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32} loader.help: help.common help.kboot ${.CURDIR}/../../fdt/help.fdt cat ${.ALLSRC} | \ Modified: head/sys/boot/powerpc/ofw/Makefile ============================================================================== --- head/sys/boot/powerpc/ofw/Makefile Mon Oct 9 22:12:39 2017 (r324451) +++ head/sys/boot/powerpc/ofw/Makefile Mon Oct 9 22:12:46 2017 (r324452) @@ -92,11 +92,10 @@ LIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a CFLAGS+= -I${.CURDIR}/../../ofw/libofw # where to get libstand from -LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a CFLAGS+= -I${SASRC} -DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND} +DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32} +LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32} loader.help: help.common help.ofw ${.CURDIR}/../../fdt/help.fdt cat ${.ALLSRC} | \ Modified: head/sys/boot/powerpc/ps3/Makefile ============================================================================== --- head/sys/boot/powerpc/ps3/Makefile Mon Oct 9 22:12:39 2017 (r324451) +++ head/sys/boot/powerpc/ps3/Makefile Mon Oct 9 22:12:46 2017 (r324452) @@ -91,11 +91,10 @@ LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powe #.include "${.CURDIR}/../../ofw/common/Makefile.inc" # where to get libstand from -LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a CFLAGS+= -I${SASRC} -DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} +DPADD= ${LIBFICL} ${LIBOFW} ${LIBSA32} +LDADD= ${LIBFICL} ${LIBOFW} ${LIBSA32} SC_DFLT_FONT=cp437 Modified: head/sys/boot/powerpc/uboot/Makefile ============================================================================== --- head/sys/boot/powerpc/uboot/Makefile Mon Oct 9 22:12:39 2017 (r324451) +++ head/sys/boot/powerpc/uboot/Makefile Mon Oct 9 22:12:46 2017 (r324452) @@ -97,11 +97,10 @@ CFLAGS+= -I${.CURDIR}/../../uboot/lib CFLAGS+= -I${.OBJDIR}/../../uboot/lib # where to get libstand from -LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a CFLAGS+= -I${SASRC} -DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSTAND} +DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA32} +LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA32} loader.help: help.common help.uboot ${.CURDIR}/../../fdt/help.fdt cat ${.ALLSRC} | \ Modified: head/sys/boot/sparc64/loader/Makefile ============================================================================== --- head/sys/boot/sparc64/loader/Makefile Mon Oct 9 22:12:39 2017 (r324451) +++ head/sys/boot/sparc64/loader/Makefile Mon Oct 9 22:12:46 2017 (r324452) @@ -85,8 +85,8 @@ CFLAGS+= -I${SASRC} # Need sys/ for crypto/intake.h CFLAGS+= -I${SRCTOP}/sys -DPADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSTAND} +DPADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSA} +LDADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSA} loader.help: help.common help.sparc64 cat ${.ALLSRC} | \ Modified: head/sys/boot/userboot/userboot/Makefile ============================================================================== --- head/sys/boot/userboot/userboot/Makefile Mon Oct 9 22:12:39 2017 (r324451) +++ head/sys/boot/userboot/userboot/Makefile Mon Oct 9 22:12:46 2017 (r324452) @@ -49,8 +49,6 @@ CFLAGS+= -DBF_DICTSIZE=15000 LIBFICL= ${.OBJDIR}/../ficl/libficl.a .endif -LIBSTAND= ${.OBJDIR}/../libstand/libstand.a - .if ${MK_ZFS} != "no" CFLAGS+= -DUSERBOOT_ZFS_SUPPORT LIBZFSBOOT= ${.OBJDIR}/../zfs/libzfsboot.a @@ -61,7 +59,7 @@ LIBZFSBOOT= ${.OBJDIR}/../zfs/libzfsboot.a .include "${.CURDIR}/../../common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../common CFLAGS+= -I. -DPADD+= ${LIBFICL} ${LIBZFSBOOT} ${LIBSTAND} -LDADD+= ${LIBFICL} ${LIBZFSBOOT} ${LIBSTAND} +DPADD+= ${LIBFICL} ${LIBZFSBOOT} ${LIBSAU} +LDADD+= ${LIBFICL} ${LIBZFSBOOT} ${LIBSAU} .include <bsd.lib.mk>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710092212.v99MClEC011111>