emulators/qemu: fix build on powerpc64*
1. asm/cputable.h is Linux-only. 2. FreeBSD doesn't yet officially support POWER10, so we don't define PPC_FEATURE2_ARCH_3_1.
This commit is contained in:
parent
083b39b615
commit
b8870b3dda
1 changed files with 18 additions and 0 deletions
18
emulators/qemu/files/patch-util_cpuinfo-ppc.c
Normal file
18
emulators/qemu/files/patch-util_cpuinfo-ppc.c
Normal file
|
@ -0,0 +1,18 @@
|
|||
--- util/cpuinfo-ppc.c.orig 2023-08-29 11:28:39 UTC
|
||||
+++ util/cpuinfo-ppc.c
|
||||
@@ -9,8 +9,14 @@
|
||||
#ifdef CONFIG_GETAUXVAL
|
||||
# include <sys/auxv.h>
|
||||
#else
|
||||
-# include <asm/cputable.h>
|
||||
+# ifdef __linux__
|
||||
+# include <asm/cputable.h>
|
||||
+# endif
|
||||
# include "elf.h"
|
||||
+#endif
|
||||
+
|
||||
+#ifndef PPC_FEATURE2_ARCH_3_1
|
||||
+# define PPC_FEATURE2_ARCH_3_1 0x00040000
|
||||
#endif
|
||||
|
||||
unsigned cpuinfo;
|
Loading…
Reference in a new issue