qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: /util/cpuinfo-aarch64.c:58:22: error: 'HWCAP_USCAT' undeclared


From: Michael Tokarev
Subject: Re: /util/cpuinfo-aarch64.c:58:22: error: 'HWCAP_USCAT' undeclared
Date: Sat, 2 Sep 2023 23:09:29 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0

02.09.2023 23:01, Marcin Juszkiewicz wrote:
...
The offending code in `/util/cpuinfo-aarch64.c` is:

 > ```c
 > #ifdef CONFIG_LINUX
 >      unsigned long hwcap = qemu_getauxval(AT_HWCAP);
 >      info |= (hwcap & HWCAP_ATOMICS ? CPUINFO_LSE : 0);
 >      info |= (hwcap & HWCAP_USCAT ? CPUINFO_LSE2 : 0);
 >      info |= (hwcap & HWCAP_AES ? CPUINFO_AES: 0);
 > #endif
 > ```

The reason is that on this distribution the <bits/hwcap.h> header
file does not define HWCAP_USCAT:

I would recommend either upgrading your distro or staying at QEMU 8.1
release.

HWCAP_USCAT was added to glibc in June 2018. As your distribution is not 
supported anymore you can also patch glibc in your system.

I don't know if other distributions are also affected, my build
platform for all xPack standalone binaries is Ubuntu 18.04 LTS.

I do not know any supported distribution release without it.

In this very case it's trivial to work-around this by using

#ifndef HWCAP_USCAT
# define HWCAP_USCAT 0
#endif

or just commenting-out this line.

But 18.04 being unsupported is true still.

/mjt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]