util: fix build with musl libc on ppc64le
Use PPC_FEATURE2_ISEL and PPC_FEATURE2_VEC_CRYPTO from linux headers instead of the GNU specific PPC_FEATURE2_HAS_ISEL and PPC_FEATURE2_HAS_VEC_CRYPTO. This fixes build with musl libc. Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1861 Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Fixes: 63922f467a ("tcg/ppc: Replace HAVE_ISEL macro with a variable") Fixes: 68f340d4cd ("tcg/ppc: Enable Altivec detection") Message-Id: <20231219105236.7059-1-ncopa@alpinelinux.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> (cherry picked from commit 1d513e06d96697f44de4a1b85c6ff627c443e306) Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
b881910859
commit
9ee4603a86
@ -6,10 +6,10 @@
|
|||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "host/cpuinfo.h"
|
#include "host/cpuinfo.h"
|
||||||
|
|
||||||
|
#include <asm/cputable.h>
|
||||||
#ifdef CONFIG_GETAUXVAL
|
#ifdef CONFIG_GETAUXVAL
|
||||||
# include <sys/auxv.h>
|
# include <sys/auxv.h>
|
||||||
#else
|
#else
|
||||||
# include <asm/cputable.h>
|
|
||||||
# include "elf.h"
|
# include "elf.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void)
|
|||||||
info |= CPUINFO_V2_06;
|
info |= CPUINFO_V2_06;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hwcap2 & PPC_FEATURE2_HAS_ISEL) {
|
if (hwcap2 & PPC_FEATURE2_ISEL) {
|
||||||
info |= CPUINFO_ISEL;
|
info |= CPUINFO_ISEL;
|
||||||
}
|
}
|
||||||
if (hwcap & PPC_FEATURE_HAS_ALTIVEC) {
|
if (hwcap & PPC_FEATURE_HAS_ALTIVEC) {
|
||||||
@ -53,7 +53,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void)
|
|||||||
* always have both anyway, since VSX came with Power7
|
* always have both anyway, since VSX came with Power7
|
||||||
* and crypto came with Power8.
|
* and crypto came with Power8.
|
||||||
*/
|
*/
|
||||||
if (hwcap2 & PPC_FEATURE2_HAS_VEC_CRYPTO) {
|
if (hwcap2 & PPC_FEATURE2_VEC_CRYPTO) {
|
||||||
info |= CPUINFO_CRYPTO;
|
info |= CPUINFO_CRYPTO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user