jam: Ensure common boot LDFLAGS and ASFLAGS get distributed

This commit is contained in:
Alexander von Gluck IV 2018-10-19 14:02:45 +00:00
parent 81b33e381f
commit 8522edfe36
3 changed files with 8 additions and 6 deletions

View File

@ -360,15 +360,16 @@ rule KernelArchitectureSetup architecture
HAIKU_KERNEL_CCFLAGS = $(HAIKU_CCFLAGS_$(architecture)) $(ccBaseFlags) ;
HAIKU_KERNEL_C++FLAGS = $(HAIKU_C++FLAGS_$(architecture)) $(c++BaseFlags) ;
HAIKU_KERNEL_PIC_CCFLAGS = -fno-pic ;
HAIKU_KERNEL_PIC_LINKFLAGS = ;
HAIKU_KERNEL_ADDON_LINKFLAGS = ;
# Common boot-related cflags which apply to all loaders
HAIKU_BOOT_CCFLAGS = $(HAIKU_CCFLAGS_$(architecture)) $(ccBaseFlags) ;
HAIKU_BOOT_C++FLAGS = $(HAIKU_C++FLAGS_$(architecture)) $(c++BaseFlags) ;
HAIKU_BOOT_LINKFLAGS = ;
HAIKU_BOOT_LDFLAGS = -Bstatic ;
HAIKU_KERNEL_PIC_CCFLAGS = -fno-pic ;
HAIKU_KERNEL_PIC_LINKFLAGS = ;
HAIKU_KERNEL_ADDON_LINKFLAGS = ;
# Any special kernel base addresses
if $(HAIKU_BOOT_LOADER_BASE) {
HAIKU_BOOT_LDFLAGS +=
@ -420,6 +421,7 @@ rule KernelArchitectureSetup architecture
}
}
# bootloader-centric flags
local bootTarget ;
for bootTarget in $(HAIKU_BOOT_TARGETS) {
switch $(bootTarget) {

View File

@ -94,7 +94,7 @@ rule SetupBoot
ObjectCcFlags $(object) : $(HAIKU_BOOT_CCFLAGS) $(HAIKU_BOOT_$(platform)_CCFLAGS) $(2) ;
ObjectC++Flags $(object) : $(HAIKU_BOOT_C++FLAGS) $(HAIKU_BOOT_$(platform)_C++FLAGS) $(2) ;
ObjectDefines $(object) : $(TARGET_KERNEL_DEFINES) ;
ASFLAGS on $(object) = $(HAIKU_BOOT_$(platform)_CCFLAGS) ;
ASFLAGS on $(object) = $(HAIKU_BOOT_CCFLAGS) $(HAIKU_BOOT_$(platform)_CCFLAGS) ;
# override warning flags
TARGET_WARNING_CCFLAGS_$(TARGET_PACKAGING_ARCH) on $(object)

View File

@ -163,7 +163,7 @@ for platform in [ MultiBootSubDirSetup ] {
local archGrist = [ FGrist src system boot arch $(TARGET_KERNEL_ARCH) $(platform:G=) ] ;
local archObject = boot_arch_$(TARGET_KERNEL_ARCH).o ;
local ldflags = $(HAIKU_BOOT_$(platform:G=:U)_LDFLAGS) ;
local ldflags = $(HAIKU_BOOT_LDFLAGS) $(HAIKU_BOOT_$(platform:G=:U)_LDFLAGS) ;
ldflags ?= $(TARGET_BOOT_LDFLAGS) ;
# efi loader needs to be shared.