Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Aug 2023 15:00:33 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: b8870b3dda5b - main - emulators/qemu: fix build on powerpc64*
Message-ID:  <202308291500.37TF0XfF017428@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=b8870b3dda5b5dd618254ea7a7644072568b612a

commit b8870b3dda5b5dd618254ea7a7644072568b612a
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-08-29 14:25:24 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-08-29 14:25:24 +0000

    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.
---
 emulators/qemu/files/patch-util_cpuinfo-ppc.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/emulators/qemu/files/patch-util_cpuinfo-ppc.c b/emulators/qemu/files/patch-util_cpuinfo-ppc.c
new file mode 100644
index 000000000000..499de6e86db0
--- /dev/null
+++ b/emulators/qemu/files/patch-util_cpuinfo-ppc.c
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202308291500.37TF0XfF017428>