From e99974aa57ec9aa4f51817346ddc744bd9f61eca Mon Sep 17 00:00:00 2001 From: Diego Sueiro Date: Thu, 6 May 2021 16:37:47 +0100 Subject: [PATCH] xen-tools: Pass -Wno-vla-parameter to workaround when compiling with gcc-11 When compiling xen-tools (4.14 and 4.15) with gcc-11 the following kind of errors are produced: linux.c:164:50: error: argument 7 of type 'const xen_pfn_t[]' {aka 'const long unsigned int[]'} declared as an ordinary array [-Werror=vla-parameter] 164 | const xen_pfn_t arr[/*num*/], int err[/*num*/]) | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~ Workaround it by passing -Wno-vla-parameter to the compiler. Signed-off-by: Diego Sueiro Signed-off-by: Bruce Ashfield --- recipes-extended/xen/xen-tools.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes-extended/xen/xen-tools.inc b/recipes-extended/xen/xen-tools.inc index 3560e798..e939c459 100644 --- a/recipes-extended/xen/xen-tools.inc +++ b/recipes-extended/xen/xen-tools.inc @@ -725,9 +725,12 @@ do_configure() { do_configure_common } +# Workaround when compiling with gcc-11 +EXTRA_CFLAGS_XEN_TOOLS_append = " -Wno-vla-parameter" + do_compile() { cd ${S} - oe_runmake tools PYTHON="${PYTHON}" + oe_runmake tools EXTRA_CFLAGS_XEN_TOOLS="${EXTRA_CFLAGS_XEN_TOOLS}" PYTHON="${PYTHON}" } do_install() {