system/boot: Don't borrow libroot objects

* kernel + bootloader get differing compiler flags
* Trying to reuse libroot objects makes what objects
  are being built with which flags slightly confusing.

Change-Id: Ic8ac7255db99d6825ca022afc3f4fd416c57c12d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4876
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
This commit is contained in:
Alexander von Gluck IV 2022-01-19 17:13:07 -06:00 committed by Alex von Gluck IV
parent c749333b59
commit 4ac99e3932

View File

@ -8,11 +8,16 @@ SubDir HAIKU_TOP src system boot arch riscv64 ;
SubDirC++Flags $(defines) -fno-rtti ;
}
# Optimizations create infinite recursion otherwise.
SubDirCcFlags -fno-builtin ;
local kernelLibArchObjects =
<src!system!kernel!lib!arch!$(TARGET_ARCH)>byteorder.o
<src!system!kernel!lib!arch!$(TARGET_ARCH)>memcpy.o
<src!system!kernel!lib!arch!$(TARGET_ARCH)>memset.o
local librootArchSources =
byteorder.S
;
local librootGenericSources =
memcpy.c
memset.c
;
local kernelArchDriverSources =
@ -33,13 +38,21 @@ for platform in [ MultiBootSubDirSetup u-boot efi riscv ] {
BootMergeObject [ FGristFiles boot_arch_$(TARGET_KERNEL_ARCH).o ] :
$(kernelArchDriverSources)
$(kernelGenericDriverSources)
$(librootArchSources)
$(librootGenericSources)
arch_cpu.cpp
: # additional flags
:
$(kernelArchObjects)
$(kernelLibArchObjects)
;
SEARCH on [ FGristFiles $(librootArchSources) ]
= [ FDirName $(HAIKU_TOP) src system libroot os arch riscv64 ] ;
SEARCH on [ FGristFiles $(librootGenericSources) ]
= [ FDirName $(HAIKU_TOP) src system libroot posix string arch generic ] ;
SEARCH on [ FGristFiles $(kernelArchDriverSources) ]
= [ FDirName $(HAIKU_TOP) src system kernel arch $(TARGET_KERNEL_ARCH_DIR) ] ;
SEARCH on [ FGristFiles $(kernelGenericDriverSources) ]