system/boot: Fix build of bootloader without zstd build-package

Change-Id: I39b52def6892f77f5b3b1c088b01459b689c80e2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4648
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This commit is contained in:
Alexander von Gluck IV 2021-10-22 19:33:25 -05:00 committed by waddlesplash
parent 1d5de1d840
commit 491592688d
2 changed files with 13 additions and 5 deletions

View File

@ -304,6 +304,12 @@ for platform in [ MultiBootSubDirSetup ] {
local ldflags = $(HAIKU_BOOT_LDFLAGS) $(HAIKU_BOOT_$(platform:G=:U)_LDFLAGS) ;
ldflags ?= $(TARGET_BOOT_LDFLAGS) ;
# needed by tarfs, packagefs, and video_splash.cpp
local supportLibs = [ FGrist boot_zlib.a ] ;
if [ FIsBuildFeatureEnabled zstd ] {
supportLibs += boot_zstd.a ;
}
# efi loader needs to be shared.
if $(TARGET_BOOT_PLATFORM) = efi {
ldflags += -shared ;
@ -332,11 +338,9 @@ for platform in [ MultiBootSubDirSetup ] {
boot_loader.a
# a second time, so undefined references in the file systems can be
# resolved
# needed by tarfs, packagefs, and video_splash.cpp
boot_zlib.a
boot_zstd.a
$(supportLibs)
]
# libroot functions needed by the stage2 boot loader
boot_libroot_$(platform:G=).o

View File

@ -4,7 +4,11 @@ UsePrivateHeaders kernel shared storage support ;
UseBuildFeatureHeaders zlib ;
UseBuildFeatureHeaders zstd ;
DEFINES += _BOOT_MODE ZSTD_ENABLED ;
DEFINES += _BOOT_MODE ;
if [ FIsBuildFeatureEnabled zstd ] {
DEFINES += ZSTD_ENABLED ;
}
local kernelC++Header = [ FDirName $(HAIKU_TOP) headers private kernel util
kernel_cpp.h ] ;