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 <geoffroy.vancutsem@intel.com>
This commit is contained in:
Geoffroy Van Cutsem 2020-11-26 17:07:41 +01:00 committed by wenlingz
parent 6f10bd00bf
commit 79892f911d
2 changed files with 1 additions and 1 deletions

View File

@ -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;

View File

@ -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