From 79892f911db93ddb724a83df098e5e37c806a961 Mon Sep 17 00:00:00 2001 From: Geoffroy Van Cutsem Date: Thu, 26 Nov 2020 17:07:41 +0100 Subject: [PATCH] misc: adjust code for gcc-10 The latest gcc 10.x changes the default to '-fno-common'. This causes a couple of build failures in ACRN. This patch changes the default behaviour to '-fcommon' for the 'acrnprobe' tool and fixes the 'hv_prebuild' codebase. More details on that change can be found here: https://gcc.gnu.org/gcc-10/porting_to.html Tracked-On: #5553 Tracked-On: #5549 Signed-off-by: Geoffroy Van Cutsem --- misc/hv_prebuild/vm_cfg_checks.c | 1 - misc/tools/acrn-crashlog/acrnprobe/Makefile | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/hv_prebuild/vm_cfg_checks.c b/misc/hv_prebuild/vm_cfg_checks.c index 4c73fccaf..3acf3e030 100644 --- a/misc/hv_prebuild/vm_cfg_checks.c +++ b/misc/hv_prebuild/vm_cfg_checks.c @@ -21,7 +21,6 @@ static uint8_t rtvm_uuids[][16] = { static uint8_t safety_vm_uuid1[16] = SAFETY_VM_UUID1; /* sanity check for below structs is not needed, so use a empty struct instead */ -struct acrn_vm_pci_dev_config sos_pci_devs[CONFIG_MAX_PCI_DEV_NUM]; const struct pci_vdev_ops vhostbridge_ops; const struct pci_vdev_ops vpci_ivshmem_ops; const struct pci_vdev_ops vmcs9900_ops; diff --git a/misc/tools/acrn-crashlog/acrnprobe/Makefile b/misc/tools/acrn-crashlog/acrnprobe/Makefile index 7bc25674c..86f6f49e8 100644 --- a/misc/tools/acrn-crashlog/acrnprobe/Makefile +++ b/misc/tools/acrn-crashlog/acrnprobe/Makefile @@ -9,6 +9,7 @@ INCLUDE += -I $(CURDIR)/include -I $(SYSROOT)/usr/include/libxml2 INCLUDE += -I $(BUILDDIR)/include/acrnprobe CFLAGS += $(INCLUDE) CFLAGS += -fdata-sections +CFLAGS += -fcommon LDFLAGS += $(LIBS) -Wl,--gc-sections