FreeBSD Bugzilla – Attachment 187179 Details for
Bug 223016
benchmarks/fio: unbreak on aarch64
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
v0.1
fio.detect-crc32.diff (text/plain), 2.52 KB, created by
Jan Beich
on 2017-10-14 22:26:52 UTC
(
hide
)
Description:
v0.1
Filename:
MIME Type:
Creator:
Jan Beich
Created:
2017-10-14 22:26:52 UTC
Size:
2.52 KB
patch
obsolete
>From 361747d46459754a92b6e7d6c5b8d395f6729472 Mon Sep 17 00:00:00 2001 >From: Jan Beich <jbeich@FreeBSD.org> >Date: Sat, 14 Oct 2017 22:01:56 +0000 >Subject: [PATCH] benchmarks/fio: unbreak on aarch64 > >PR: 223016 >Approved by: ??? >MFH: 2017Q4 (ports-secteam blanket) >--- > benchmarks/fio/Makefile | 3 +- > benchmarks/fio/files/patch-crc_crc32c-arm64.c | 45 +++++++++++++++++++++++++++ > 2 files changed, 47 insertions(+), 1 deletion(-) > create mode 100644 benchmarks/fio/files/patch-crc_crc32c-arm64.c > >diff --git a/benchmarks/fio/Makefile b/benchmarks/fio/Makefile >index 4f4ac7670f88..441f492ea1db 100644 >--- a/benchmarks/fio/Makefile >+++ b/benchmarks/fio/Makefile >@@ -18,10 +18,11 @@ GNUPLOT_DESC= Support for plotting graphs > > GNUPLOT_BUILD_DEPENDS= ${LOCALBASE}/bin/gnuplot:math/gnuplot > >-BROKEN_aarch64= Fails to compile: error: sys/auxv.h file not found > BROKEN_armv6= Fails to compile: error: use of undeclared identifier nop > BROKEN_powerpc64= Fails to compile: verify.c:1574: undefined reference to bswap64 > >+post-patch: >+ @${REINPLACE_CMD} -e '/sys\/auxv/d' ${WRKSRC}/configure > do-install: > ${INSTALL_PROGRAM} ${WRKSRC}/fio ${STAGEDIR}${PREFIX}/bin > ${INSTALL_SCRIPT} ${WRKSRC}/tools/fio_generate_plots ${STAGEDIR}${PREFIX}/bin >diff --git a/benchmarks/fio/files/patch-crc_crc32c-arm64.c b/benchmarks/fio/files/patch-crc_crc32c-arm64.c >new file mode 100644 >index 000000000000..4662468d84aa >--- /dev/null >+++ b/benchmarks/fio/files/patch-crc_crc32c-arm64.c >@@ -0,0 +1,45 @@ >+--- crc/crc32c-arm64.c.orig 2017-09-28 10:23:20 UTC >++++ crc/crc32c-arm64.c >+@@ -23,7 +23,42 @@ bool crc32c_arm64_available = false; >+ >+ #ifdef ARCH_HAVE_ARM64_CRC_CRYPTO >+ >++#if __has_include(<sys/auxv.h>) >+ #include <sys/auxv.h> >++#elif defined(__FreeBSD__) >++#include <sys/param.h> >++#include <sys/sysctl.h> >++#include <elf.h> >++#include <errno.h> >++#include <unistd.h> >++ >++#ifndef AT_HWCAP >++#define AT_HWCAP 25 >++#endif >++ >++static unsigned long getauxval(unsigned long type) { >++ Elf_Auxinfo auxv[AT_COUNT]; >++ size_t len = sizeof(auxv); >++ int mib[] = { >++ CTL_KERN, >++ KERN_PROC, >++ KERN_PROC_AUXV, >++ getpid(), >++ }; >++ >++ if (sysctl(mib, nitems(mib), auxv, &len, NULL, 0) != -1) { >++ for (size_t i = 0; i < nitems(auxv); i++) >++ if ((unsigned long)auxv[i].a_type == type) >++ return auxv[i].a_un.a_val; >++ >++ errno = ENOENT; >++ } >++ return 0; >++} >++#else >++#define AT_HWCAP 16 >++#define getauxval(x) 0 >++#endif /* <sys/auxv.h> */ >+ #include <arm_acle.h> >+ #include <arm_neon.h> >+
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:
jbeich
:
maintainer-approval?
(
bapt
)
Actions:
View
|
Diff
Attachments on
bug 223016
:
187178
| 187179