diff --git a/src/system/boot/Jamfile b/src/system/boot/Jamfile index 59033a0f8d..de1b8f6b19 100644 --- a/src/system/boot/Jamfile +++ b/src/system/boot/Jamfile @@ -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 diff --git a/src/system/boot/loader/file_systems/packagefs/Jamfile b/src/system/boot/loader/file_systems/packagefs/Jamfile index 8be9053bc7..033a2fa0df 100644 --- a/src/system/boot/loader/file_systems/packagefs/Jamfile +++ b/src/system/boot/loader/file_systems/packagefs/Jamfile @@ -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 ] ;