Convert over to using elf_aux_info().
Index: Makefile
===================================================================
RCS file: /cvs/ports/emulators/qemu/Makefile,v
retrieving revision 1.242
diff -u -p -u -p -r1.242 Makefile
--- Makefile 26 Jul 2024 11:49:01 -0000 1.242
+++ Makefile 1 Sep 2024 04:31:43 -0000
@@ -8,6 +8,7 @@ COMMENT-ga= QEMU guest agent
VERSION= 9.0.2
DISTNAME= qemu-${VERSION}
+REVISION= 0
CATEGORIES= emulators
SITES= https://download.qemu.org/
EXTRACT_SUFX= .tar.xz
Index: patches/patch-meson_build
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-meson_build,v
retrieving revision 1.13
diff -u -p -u -p -r1.13 patch-meson_build
--- patches/patch-meson_build 28 May 2024 13:57:37 -0000 1.13
+++ patches/patch-meson_build 1 Sep 2024 04:31:43 -0000
@@ -1,3 +1,6 @@
+- util/cpuinfo: Make use of elf_aux_info(3) on OpenBSD
+ 27fca0a0d560ae704457c5f89e0be658afef034d
+
- localstatedir does not belong under prefix
- Remove hardcoding of optimization
@@ -13,7 +16,22 @@ Index: meson.build
config_host_data.set_quoted('CONFIG_QEMU_MODDIR', get_option('prefix') / qemu_moddir)
config_host_data.set_quoted('CONFIG_SYSCONFDIR', get_option('prefix') / get_option('sysconfdir'))
-@@ -4226,9 +4226,6 @@ else
+@@ -2743,6 +2743,14 @@ config_host_data.set('CONFIG_GETAUXVAL', cc.links(gnu_
+ return getauxval(AT_HWCAP) == 0;
+ }'''))
+
++config_host_data.set('CONFIG_ELF_AUX_INFO', cc.links(gnu_source_prefix + '''
++ #include <sys/auxv.h>
++ int main(void) {
++ unsigned long hwcap = 0;
++ elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap));
++ return hwcap;
++ }'''))
++
+ config_host_data.set('CONFIG_USBFS', have_linux_user and cc.compiles('''
+ #include <linux/usbdevice_fs.h>
+
+@@ -4226,9 +4234,6 @@ else
summary_info += {'Objective-C compiler': false}
endif
option_cflags = (get_option('debug') ? ['-g'] : [])
Index: patches/patch-util_cpuinfo-aarch64_c
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-util_cpuinfo-aarch64_c,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-util_cpuinfo-aarch64_c
--- patches/patch-util_cpuinfo-aarch64_c 15 Jul 2024 11:13:29 -0000 1.1
+++ patches/patch-util_cpuinfo-aarch64_c 1 Sep 2024 04:31:43 -0000
@@ -1,14 +1,22 @@
-util/cpuinfo-aarch64: Add OpenBSD support
-ab089908b42f22e7edfa0d40db963c136ab35419
+- util/cpuinfo-aarch64: Add OpenBSD support
+ ab089908b42f22e7edfa0d40db963c136ab35419
+- util/cpuinfo: Make use of elf_aux_info(3) on OpenBSD
+ 27fca0a0d560ae704457c5f89e0be658afef034d
Index: util/cpuinfo-aarch64.c
--- util/cpuinfo-aarch64.c.orig
+++ util/cpuinfo-aarch64.c
-@@ -20,6 +20,12 @@
+@@ -17,9 +17,18 @@
+ # define HWCAP2_BTI 0 /* added in glibc 2.32 */
+ # endif
+
No comments:
Post a Comment