fix parallel build

Since acrn-hypervisor 9c81f4c32c1f ("hv:build library to lib_mod.a"),
the parallel build system was broken. You cannot use "make -j #" to
build ACRN.

To fix this we need to declare explicit rules for the files to be built.
This commit is contained in:
Miguel Bernal Marin 2019-07-02 01:19:39 -05:00
parent 400aa4183b
commit fd52b2506a
2 changed files with 78 additions and 0 deletions

View File

@ -0,0 +1,77 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
Date: Tue, 2 Jul 2019 01:14:51 -0500
Subject: [PATCH] makefile: fix parallel build
Since 9c81f4c32c1f ("hv:build library to lib_mod.a"), the parallel build
system was broken. You cannot use "make -j #" to build ACRN.
To fix this we need to declare explicit rules for the files to be built.
---
hypervisor/Makefile | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/hypervisor/Makefile b/hypervisor/Makefile
index 0fbac5a9..c824c353 100644
--- a/hypervisor/Makefile
+++ b/hypervisor/Makefile
@@ -385,21 +385,45 @@ header: $(VERSION) $(HV_OBJDIR)/$(HV_CONFIG_H) $(TARGET_ACPI_INFO_HEADER)
.PHONY: lib-mod boot-mod hw-mod vp-base-mod vp-dm-mod vp-trusty-mod vp-hcall-mod sys-init-mod
lib-mod: $(LIB_C_OBJS) $(LIB_S_OBJS)
$(AR) $(ARFLAGS) $(LIB_MOD) $(LIB_C_OBJS) $(LIB_S_OBJS)
+
+$(LIB_MOD): lib-mod
+
boot-mod: $(BOOT_S_OBJS) $(BOOT_C_OBJS)
$(AR) $(ARFLAGS) $(BOOT_MOD) $(BOOT_S_OBJS) $(BOOT_C_OBJS)
+
+$(BOOT_MOD): boot-mod
+
hw-mod: $(HW_S_OBJS) $(HW_C_OBJS)
$(AR) $(ARFLAGS) $(HW_MOD) $(HW_S_OBJS) $(HW_C_OBJS)
+
+$(HW_MOD): hw-mod
+
vp-base-mod: $(VP_BASE_S_OBJS) $(VP_BASE_C_OBJS)
$(AR) $(ARFLAGS) $(VP_BASE_MOD) $(VP_BASE_S_OBJS) $(VP_BASE_C_OBJS)
+
+$(VP_BASE_MOD): vp-base-mod
+
vp-dm-mod: $(VP_DM_C_OBJS)
$(AR) $(ARFLAGS) $(VP_DM_MOD) $(VP_DM_C_OBJS)
+
+$(VP_DM_MOD): vp-dm-mod
+
vp-trusty-mod: $(VP_TRUSTY_C_OBJS)
$(AR) $(ARFLAGS) $(VP_TRUSTY_MOD) $(VP_TRUSTY_C_OBJS)
+
+$(VP_TRUSTY_MOD): vp-trusty-mod
+
vp-hcall-mod: $(VP_HCALL_C_OBJS)
$(AR) $(ARFLAGS) $(VP_HCALL_MOD) $(VP_HCALL_C_OBJS)
+
+$(VP_HCALL_MOD): vp-hcall-mod
+
sys-init-mod: $(SYS_INIT_C_OBJS)
$(AR) $(ARFLAGS) $(SYS_INIT_MOD) $(SYS_INIT_C_OBJS)
+$(SYS_INIT_MOD): sys-init-mod
+
+
.PHONY: lib
lib: $(SUB_MAKEFILES)
@@ -409,6 +433,10 @@ $(SUB_MAKEFILES): header
$(MAKE) -f $$Makefile MKFL_NAME=$$Makefile; \
done
+$(LIB_RELEASE): lib
+
+$(LIB_DEBUG): lib
+
$(HV_OBJDIR)/$(HV_FILE).32.out: $(HV_OBJDIR)/$(HV_FILE).out
$(OBJCOPY) -S --section-alignment=0x1000 -O elf32-i386 $< $@
--
https://clearlinux.org

1
series Normal file
View File

@ -0,0 +1 @@
0001-makefile-fix-parallel-build.patch