Date: Wed, 24 Apr 2024 21:21:40 GMT From: Piotr Kubaj <pkubaj@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: abf68fe4a24c - main - emulators/qemu-devel: fix build on powerpc64* with a patch from emulators/qemu Message-ID: <202404242121.43OLLelw080633@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=abf68fe4a24c88a8bece6e40c25bae7925ca3e7d commit abf68fe4a24c88a8bece6e40c25bae7925ca3e7d Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: 2024-04-18 08:58:22 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2024-04-24 21:21:05 +0000 emulators/qemu-devel: fix build on powerpc64* with a patch from emulators/qemu --- .../qemu-devel/files/patch-util_cpuinfo-ppc.c | 27 ++++++++++++++++------ 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/emulators/qemu-devel/files/patch-util_cpuinfo-ppc.c b/emulators/qemu-devel/files/patch-util_cpuinfo-ppc.c index ae39b6c3f4ae..af9999a22108 100644 --- a/emulators/qemu-devel/files/patch-util_cpuinfo-ppc.c +++ b/emulators/qemu-devel/files/patch-util_cpuinfo-ppc.c @@ -1,21 +1,34 @@ ---- util/cpuinfo-ppc.c.orig 2024-01-26 18:16:35 UTC +--- util/cpuinfo-ppc.c.orig 2024-01-29 19:13:22 UTC +++ util/cpuinfo-ppc.c -@@ -6,11 +6,17 @@ +@@ -6,13 +6,21 @@ #include "qemu/osdep.h" #include "host/cpuinfo.h" -#include <asm/cputable.h> #ifdef CONFIG_GETAUXVAL # include <sys/auxv.h> + #else +# ifdef __linux__ +# include <asm/cputable.h> ++# elif defined(__FreeBSD__) ++# include <machine/cpu.h> +# endif - #else # include "elf.h" -+#endif -+ -+#ifndef PPC_FEATURE2_ARCH_3_1 -+# define PPC_FEATURE2_ARCH_3_1 0x00040000 #endif ++#ifndef PPC_FEATURE2_ARCH_3_1 ++# define PPC_FEATURE2_ARCH_3_1 0x00040000 ++#endif ++ unsigned cpuinfo; + + /* Called both as constructor and (possibly) via other constructors. */ +@@ -53,7 +61,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(voi + * always have both anyway, since VSX came with Power7 + * and crypto came with Power8. + */ +- if (hwcap2 & PPC_FEATURE2_VEC_CRYPTO) { ++ if (hwcap2 & PPC_FEATURE2_HAS_VEC_CRYPTO) { + info |= CPUINFO_CRYPTO; + } + }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202404242121.43OLLelw080633>