On Thu, May 6, 2021 at 2:01 AM Diego Sueiro <[email protected]> wrote: > > Hello, > > > > We identified compilation errors for xen-tools (4.14 and 4.15) with GCC 11.1 > due to `-Werror=vla-parameter`. > > > > There are a couple of source files with similar errors like this: > > ``` > > 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*/]) > > | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~ > > ``` > > > > The quick fix for is to have the following: > > ``` > > diff --git a/recipes-extended/xen/xen-tools.inc > b/recipes-extended/xen/xen-tools.inc > > index 3560e79..5a054af 100644 > > --- a/recipes-extended/xen/xen-tools.inc > > +++ b/recipes-extended/xen/xen-tools.inc > > @@ -725,9 +725,11 @@ do_configure() { > > do_configure_common > > } > > > > +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() { > > ``` > > > > I’d like to know if this is an acceptable solution or if you have any other > suggestions other than fixing the actual code > > since this might take some time and I think that the Xen community will be > looking at this soon. >
I'm ok with the workaround. The code hasn't changed, and we've lived with it so far, so I'm not really concerned at the technical level about the warning. And I'd rather no one spend the time to do a fix that might be different than the eventual upstream Xen solution. Bruce > > > Cheers, > > > > -- > Diego Sueiro > > -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#6487): https://lists.yoctoproject.org/g/meta-virtualization/message/6487 Mute This Topic: https://lists.yoctoproject.org/mt/82624302/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
