From 8701bb8faeeef094292ba5f23b3b1a2546d9e449 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 29 Dec 2017 18:08:35 +0000 Subject: [PATCH] Fix ubldr. uboot/lib uses defines for the loader. It's part of the loader, but not compile as loader (it's building a library), so we can't just include loader.mk for the defines. Move LOADER_DISK_SUPPORT back to defs.mk for the moment. Sponsored by: Netflix --- stand/defs.mk | 7 +++++++ stand/loader.mk | 5 +---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/stand/defs.mk b/stand/defs.mk index 8d4be1ee767c..79e52690a599 100644 --- a/stand/defs.mk +++ b/stand/defs.mk @@ -58,6 +58,13 @@ LIBGELIBOOT= ${BOOTOBJ}/geli/libgeliboot.a .endif # MK_LOADER_GELI .endif # HAVE_GELI +# These should be confined to loader.mk, but can't because uboot/lib +# also uses it. It's part of loader, but isn't a loader so we can't +# just include loader.mk +.if ${LOADER_DISK_SUPPORT:Uyes} == "yes" +CFLAGS+= -DLOADER_DISK_SUPPORT +.endif + # Machine specific flags for all builds here # All PowerPC builds are 32 bit. We have no 64-bit loaders on powerpc diff --git a/stand/loader.mk b/stand/loader.mk index 4acd9c75f96f..9a6b19203db9 100644 --- a/stand/loader.mk +++ b/stand/loader.mk @@ -105,16 +105,13 @@ CFLAGS+= -DLOADER_NFS_SUPPORT CFLAGS+= -DLOADER_TFTP_SUPPORT .endif -# Disk and partition support -.if ${LOADER_DISK_SUPPORT:Uyes} == "yes" -CFLAGS+= -DLOADER_DISK_SUPPORT +# Partition support .if ${LOADER_GPT_SUPPORT:Uyes} == "yes" CFLAGS+= -DLOADER_GPT_SUPPORT .endif .if ${LOADER_MBR_SUPPORT:Uyes} == "yes" CFLAGS+= -DLOADER_MBR_SUPPORT .endif -.endif .if defined(HAVE_ZFS) CFLAGS+= -DLOADER_ZFS_SUPPORT