FreeBSD Bugzilla – Attachment 234983 Details for
Bug 264942
x11/babl: fix build on armv7
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
x11/babl: fix build on armv7
0001-x11-babl-fix-build-on-armv6-armv7.patch (text/plain), 1.68 KB, created by
Robert Clausecker
on 2022-06-28 13:58:12 UTC
(
hide
)
Description:
x11/babl: fix build on armv7
Filename:
MIME Type:
Creator:
Robert Clausecker
Created:
2022-06-28 13:58:12 UTC
Size:
1.68 KB
patch
obsolete
>From 5b8892098e681a80f217ea75c87cf8be3dc6fd5c Mon Sep 17 00:00:00 2001 >From: Robert Clausecker <fuz@fuz.su> >Date: Tue, 28 Jun 2022 15:54:40 +0200 >Subject: [PATCH] x11/babl: fix build on armv6/armv7 > >We use a different method for fetching ELF aux vectors on FreeBSD. >--- > x11/babl/files/patch-babl_babl-cpuaccel.c | 43 +++++++++++++++++++++++ > 1 file changed, 43 insertions(+) > create mode 100644 x11/babl/files/patch-babl_babl-cpuaccel.c > >diff --git a/x11/babl/files/patch-babl_babl-cpuaccel.c b/x11/babl/files/patch-babl_babl-cpuaccel.c >new file mode 100644 >index 000000000000..65adc87df47c >--- /dev/null >+++ b/x11/babl/files/patch-babl_babl-cpuaccel.c >@@ -0,0 +1,43 @@ >+--- babl/babl-cpuaccel.c.orig 2022-06-28 12:20:06 UTC >++++ babl/babl-cpuaccel.c >+@@ -556,33 +556,19 @@ arch_accel (void) >+ #include <fcntl.h> >+ #include <string.h> >+ #include <elf.h> >++#include <sys/auxv.h> >+ >+ #define HAVE_ACCEL 1 >+ >+ static guint32 >+ arch_accel (void) >+ { >+- /* TODO : add or hardcode the other ways it can be on arm, where >+- * this info comes from the system and not from running cpu >+- * instructions >+- */ >+- int has_neon = 0; >+- int fd = open ("/proc/self/auxv", O_RDONLY); >+- Elf32_auxv_t auxv; >+- if (fd >= 0) >+- { >+- while (read (fd, &auxv, sizeof (Elf32_auxv_t)) == sizeof (Elf32_auxv_t)) >+- { >+- if (auxv.a_type == AT_HWCAP) >+- { >+- if (auxv.a_un.a_val & 4096) >+- has_neon = 1; >+- } >+- } >+- close (fd); >+- } >+- return has_neon?BABL_CPU_ACCEL_ARM_NEON:0; >+-} >++ unsigned long hwcap = 0; >++ >++ elf_aux_info(AT_HWCAP, &hwcap, sizeof hwcap); >++ >++ return hwcap & HWCAP_NEON ? BABL_CPU_ACCEL_ARM_NEON : 0; >++} >+ >+ #endif /* ARCH_ARM */ >+ >-- >2.35.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
fuz
:
maintainer-approval?
(
gnome
)
Actions:
View
|
Diff
Attachments on
bug 264942
: 234983