>-----Original Message-----
>From: [email protected] <meta-
>[email protected]> On Behalf Of Bruce Ashfield via
>lists.yoctoproject.org
>Sent: 06 May 2021 16:44
>To: Diego Sueiro <[email protected]>
>Cc: [email protected]; Christopher Clark
><[email protected]>; nd <[email protected]>
>Subject: Re: [meta-virtualization][PATCH] xen-tools: Pass -Wno-vla-parameter
>to workaround when compiling with gcc-11
>
>Ross also mentioned on IRC, that fedora is cooking something up:
>
>https://src.fedoraproject.org/rpms/xen/blob/rawhide/f/xen.gcc11.fixes.patch
>
>But I have no idea about the upstream status, etc.
>

I'm not comfortable in adding the mentioned patch since tests need to be
done to ensure that it does not introduce any regressions.

--
Diego

>Bruce
>
>On Thu, May 6, 2021 at 11:38 AM Diego Sueiro <[email protected]>
>wrote:
>>
>> 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 <[email protected]>
>> ---
>>  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 3560e79..e939c45 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() {
>> --
>> 2.17.1
>>
>>
>>
>>
>
>
>--
>- 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 (#6490): 
https://lists.yoctoproject.org/g/meta-virtualization/message/6490
Mute This Topic: https://lists.yoctoproject.org/mt/82633036/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to