svn commit: r324450 - in head/sys/boot: . arm/uboot common efi/fdt efi/libefi efi/loader i386/libfirewire i386/libi386 i386/loader libstand32 mips/beri/boot2 mips/beri/loader mips/uboot ofw/libofw ...
Warner Losh
imp at FreeBSD.org
Mon Oct 9 22:12:36 UTC 2017
Author: imp
Date: Mon Oct 9 22:12:32 2017
New Revision: 324450
URL: https://svnweb.freebsd.org/changeset/base/324450
Log:
Define SASRC and use it
Define SASRC to point to the current libstand sources. Include
../Makefile.inc early enough in a few places so we can .include
"${SASRC}/Makefile" and have it work. Create a new pass-up
Makefile.inc in sys/boot/userboot to allow this pattern to work.
Sponsored by: Netflix
Added:
head/sys/boot/userboot/Makefile.inc (contents, props changed)
Modified:
head/sys/boot/Makefile.inc
head/sys/boot/arm/uboot/Makefile
head/sys/boot/common/Makefile.inc
head/sys/boot/efi/fdt/Makefile
head/sys/boot/efi/libefi/Makefile
head/sys/boot/efi/loader/Makefile
head/sys/boot/i386/libfirewire/Makefile
head/sys/boot/i386/libi386/Makefile
head/sys/boot/i386/loader/Makefile
head/sys/boot/libstand32/Makefile
head/sys/boot/mips/beri/boot2/Makefile
head/sys/boot/mips/beri/loader/Makefile
head/sys/boot/mips/uboot/Makefile
head/sys/boot/ofw/libofw/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/uboot/fdt/Makefile
head/sys/boot/uboot/lib/Makefile
head/sys/boot/userboot/libstand/Makefile
head/sys/boot/userboot/userboot/Makefile
head/sys/boot/userboot/zfs/Makefile
head/sys/boot/zfs/Makefile
Modified: head/sys/boot/Makefile.inc
==============================================================================
--- head/sys/boot/Makefile.inc Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/Makefile.inc Mon Oct 9 22:12:32 2017 (r324450)
@@ -2,6 +2,11 @@
.include <src.opts.mk>
+.if !defined(__BOOT_MAKEFILE_INC__)
+__BOOT_MAKEFILE_INC__=${MFILE}
+
+SASRC=${SRCTOP}/lib/libstand
+
SSP_CFLAGS=
.if ${MACHINE_CPUARCH} == "arm"
@@ -24,9 +29,9 @@ DD_NOSTATUS!=(dd status=none count=0 2> /dev/null && e
DD=dd ${DD_NOSTATUS}
.if ${MK_LOADER_FORCE_LE} != "no"
-
.if ${MACHINE_ARCH} == "powerpc64"
CFLAGS+= -mlittle-endian
+.endif
.endif
.endif
Modified: head/sys/boot/arm/uboot/Makefile
==============================================================================
--- head/sys/boot/arm/uboot/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/arm/uboot/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -113,7 +113,7 @@ CFLAGS+= -I${.CURDIR}/../../uboot/lib
CFLAGS+= -I${.OBJDIR}/../../uboot/lib
# where to get libstand from
-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
+CFLAGS+= -I${SASRC}
CFLAGS+= -fPIC
Modified: head/sys/boot/common/Makefile.inc
==============================================================================
--- head/sys/boot/common/Makefile.inc Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/common/Makefile.inc Mon Oct 9 22:12:32 2017 (r324450)
@@ -70,7 +70,7 @@ CFLAGS+= -DBOOT_PROMPT_123
.if defined(LOADER_INSTALL_SUPPORT)
SRCS+= install.c
-CFLAGS+=-I${.CURDIR}/../../../../lib/libstand
+CFLAGS+=-I${SASRC}
.endif
CLEANFILES+= vers.c
Modified: head/sys/boot/efi/fdt/Makefile
==============================================================================
--- head/sys/boot/efi/fdt/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/efi/fdt/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -17,7 +17,7 @@ CFLAGS+= -mgeneral-regs-only
CFLAGS+= -msoft-float
.endif
-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
+CFLAGS+= -I${SASRC}
# EFI library headers
CFLAGS+= -I${.CURDIR}/../include
Modified: head/sys/boot/efi/libefi/Makefile
==============================================================================
--- head/sys/boot/efi/libefi/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/efi/libefi/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -37,7 +37,7 @@ CFLAGS+= -fPIC -mno-red-zone
.endif
CFLAGS+= -I${.CURDIR}/../include
CFLAGS+= -I${.CURDIR}/../include/${MACHINE}
-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
+CFLAGS+= -I${SASRC}
.if ${MK_ZFS} != "no"
CFLAGS+= -I${.CURDIR}/../../zfs
CFLAGS+= -I${.CURDIR}/../../../cddl/boot/zfs
Modified: head/sys/boot/efi/loader/Makefile
==============================================================================
--- head/sys/boot/efi/loader/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/efi/loader/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -37,7 +37,7 @@ CWARNFLAGS.zfs.c+= -Wno-missing-prototypes
.endif
.if defined(LOADER_NET_SUPPORT)
-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
+CFLAGS+= -I${SASRC}
.endif
.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} > 40201
Modified: head/sys/boot/i386/libfirewire/Makefile
==============================================================================
--- head/sys/boot/i386/libfirewire/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/i386/libfirewire/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -10,7 +10,7 @@ SRCS+= dcons.c fwcrom.c
CFLAGS+= -D_BOOT
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I.
-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
+CFLAGS+= -I${SASRC}
CFLAGS+= -I${.CURDIR}/../btx/lib
CFLAGS+= -I${.CURDIR}/../libi386
Modified: head/sys/boot/i386/libi386/Makefile
==============================================================================
--- head/sys/boot/i386/libi386/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/i386/libi386/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -60,7 +60,7 @@ CFLAGS+= -I${.CURDIR}/../../ficl -I${.CURDIR}/../../fi
-I${.CURDIR}/../../../contrib/dev/acpica/include \
-I${.CURDIR}/../../.. -I.
# the location of libstand
-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
+CFLAGS+= -I${SASRC}
# Handle FreeBSD specific %b and %D printf format specifiers
CFLAGS+= ${FORMAT_EXTENSIONS}
Modified: head/sys/boot/i386/loader/Makefile
==============================================================================
--- head/sys/boot/i386/loader/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/i386/loader/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -29,7 +29,7 @@ LIBZFSBOOT= ${.OBJDIR}/../../zfs/libzfsboot.a
.endif
.if defined(LOADER_NET_SUPPORT)
-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
+CFLAGS+= -I${SASRC}
.endif
.if defined(LOADER_TFTP_SUPPORT)
Modified: head/sys/boot/libstand32/Makefile
==============================================================================
--- head/sys/boot/libstand32/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/libstand32/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -2,23 +2,25 @@
.include <src.opts.mk>
-LIBSTAND_SRC= ${.CURDIR}/../../../lib/libstand
+.include "../Makefile.inc"
+
.if ${MACHINE_CPUARCH} == "amd64"
LIBSTAND_CPUARCH=i386
.else
LIBSTAND_CPUARCH=${MACHINE_CPUARCH}
.endif
-LIBC_SRC= ${LIBSTAND_SRC}/../libc
+LIBSTAND_SRC= ${SASRC}
+LIBC_SRC= ${SRCTOP}/lib/libc
INTERNALLIB=
INCS=
MAN=
-.PATH: ${LIBSTAND_SRC}
+.PATH: ${SASRC}
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64"
CFLAGS+= -m32 -I.
.endif
-.include "${LIBSTAND_SRC}/Makefile"
+.include "${SASRC}/Makefile"
.if ${MACHINE_CPUARCH} == "amd64"
CLEANFILES+= machine
Modified: head/sys/boot/mips/beri/boot2/Makefile
==============================================================================
--- head/sys/boot/mips/beri/boot2/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/mips/beri/boot2/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -58,7 +58,7 @@ CFLAGS= -ffreestanding \
-g
# where to get libstand from
-CFLAGS+= -I${.CURDIR}/../../../../../lib/libstand/
+CFLAGS+= -I${SASRC}
LIBSTAND= ${.OBJDIR}/../../../../../lib/libstand/libstand.a
LDFLAGS= -nostdlib \
Modified: head/sys/boot/mips/beri/loader/Makefile
==============================================================================
--- head/sys/boot/mips/beri/loader/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/mips/beri/loader/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -108,7 +108,7 @@ LDFLAGS= -nostdlib \
-e __start
# where to get libstand from
-CFLAGS+= -I${.CURDIR}/../../../../../lib/libstand/
+CFLAGS+= -I${SASRC}
LIBSTAND= ${.OBJDIR}/../../../../../lib/libstand/libstand.a
DPADD= ${LIBFICL} ${LIBSTAND}
Modified: head/sys/boot/mips/uboot/Makefile
==============================================================================
--- head/sys/boot/mips/uboot/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/mips/uboot/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -116,7 +116,7 @@ CFLAGS+= -I${.CURDIR}/../../uboot/lib
CFLAGS+= -I${.OBJDIR}/../../uboot/lib
# where to get libstand from
-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
+CFLAGS+= -I${SASRC}
LIBSTAND= ${.OBJDIR}/../../../../lib/libstand/libstand.a
# clang doesn't understand %D as a specifier to printf
Modified: head/sys/boot/ofw/libofw/Makefile
==============================================================================
--- head/sys/boot/ofw/libofw/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/ofw/libofw/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -9,7 +9,7 @@ SRCS= devicename.c elf_freebsd.c ofw_console.c ofw_cop
.PATH: ${.CURDIR}/../../zfs
SRCS+= devicename_stubs.c
-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
+CFLAGS+= -I${SASRC}
# Pick up the bootstrap header for some interface items
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I.
Modified: head/sys/boot/powerpc/kboot/Makefile
==============================================================================
--- head/sys/boot/powerpc/kboot/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/powerpc/kboot/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -95,7 +95,7 @@ CFLAGS+= -Wa,-mppc64bridge
# where to get libstand from
LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a
-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
+CFLAGS+= -I${SASRC}
DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND}
LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND}
Modified: head/sys/boot/powerpc/ofw/Makefile
==============================================================================
--- head/sys/boot/powerpc/ofw/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/powerpc/ofw/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -93,7 +93,7 @@ CFLAGS+= -I${.CURDIR}/../../ofw/libofw
# where to get libstand from
LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a
-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
+CFLAGS+= -I${SASRC}
DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND}
LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND}
Modified: head/sys/boot/powerpc/ps3/Makefile
==============================================================================
--- head/sys/boot/powerpc/ps3/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/powerpc/ps3/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -92,7 +92,7 @@ LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powe
# where to get libstand from
LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a
-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
+CFLAGS+= -I${SASRC}
DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND}
LDADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND}
Modified: head/sys/boot/powerpc/uboot/Makefile
==============================================================================
--- head/sys/boot/powerpc/uboot/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/powerpc/uboot/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -98,7 +98,7 @@ CFLAGS+= -I${.OBJDIR}/../../uboot/lib
# where to get libstand from
LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a
-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
+CFLAGS+= -I${SASRC}
DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSTAND}
LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSTAND}
Modified: head/sys/boot/sparc64/loader/Makefile
==============================================================================
--- head/sys/boot/sparc64/loader/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/sparc64/loader/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -80,7 +80,7 @@ LIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a
CFLAGS+= -I${.CURDIR}/../../ofw/libofw/
# where to get libstand from
-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
+CFLAGS+= -I${SASRC}
# Need sys/ for crypto/intake.h
CFLAGS+= -I${SRCTOP}/sys
Modified: head/sys/boot/uboot/fdt/Makefile
==============================================================================
--- head/sys/boot/uboot/fdt/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/uboot/fdt/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -12,7 +12,7 @@ SRCS= uboot_fdt.c
CFLAGS+= -ffreestanding -msoft-float
-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
+CFLAGS+= -I${SASRC}
# U-Boot library headers
CFLAGS+= -I${.CURDIR}/../lib
Modified: head/sys/boot/uboot/lib/Makefile
==============================================================================
--- head/sys/boot/uboot/lib/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/uboot/lib/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -13,7 +13,7 @@ SRCS+= module.c net.c reboot.c time.c
CFLAGS+= -ffreestanding -msoft-float
-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
+CFLAGS+= -I${SASRC}
.if !defined(LOADER_NO_DISK_SUPPORT)
SRCS+= disk.c
Added: head/sys/boot/userboot/Makefile.inc
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sys/boot/userboot/Makefile.inc Mon Oct 9 22:12:32 2017 (r324450)
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+.include "../Makefile.inc"
Modified: head/sys/boot/userboot/libstand/Makefile
==============================================================================
--- head/sys/boot/userboot/libstand/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/userboot/libstand/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -1,8 +1,9 @@
# $FreeBSD$
.include <src.opts.mk>
+.include "../Makefile.inc"
-LIBSTAND_SRC= ${.CURDIR}/../../../../lib/libstand
+LIBSTAND_SRC= ${SASRC}
INTERNALLIB=
INCS=
Modified: head/sys/boot/userboot/userboot/Makefile
==============================================================================
--- head/sys/boot/userboot/userboot/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/userboot/userboot/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -32,7 +32,7 @@ CFLAGS+= -Wall
CFLAGS+= -I${.CURDIR}/..
CFLAGS+= -I${.CURDIR}/../../common
CFLAGS+= -I${.CURDIR}/../../..
-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
+CFLAGS+= -I${SASRC}
CFLAGS+= -ffreestanding -I.
CWARNFLAGS.main.c += -Wno-implicit-function-declaration
Modified: head/sys/boot/userboot/zfs/Makefile
==============================================================================
--- head/sys/boot/userboot/zfs/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/userboot/zfs/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -12,7 +12,7 @@ SRCS+= zfs.c skein.c skein_block.c
CFLAGS+= -DSKEIN_LOOP=111
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I.
-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
+CFLAGS+= -I${SASRC}
CFLAGS+= -I${.CURDIR}/../../../cddl/boot/zfs
CFLAGS+= -I${.CURDIR}/../../../crypto/skein
Modified: head/sys/boot/zfs/Makefile
==============================================================================
--- head/sys/boot/zfs/Makefile Mon Oct 9 22:11:57 2017 (r324449)
+++ head/sys/boot/zfs/Makefile Mon Oct 9 22:12:32 2017 (r324450)
@@ -12,7 +12,7 @@ CFLAGS+= -DSKEIN_LOOP=111
CFLAGS+= -DBOOTPROG=\"zfsloader\"
CFLAGS+= -I${.CURDIR}/../common -I${.CURDIR}/../.. -I.
-CFLAGS+= -I${.CURDIR}/../../../lib/libstand
+CFLAGS+= -I${SASRC}
CFLAGS+= -I${.CURDIR}/../../cddl/boot/zfs
CFLAGS+= -I${.CURDIR}/../../crypto/skein
More information about the svn-src-all
mailing list