All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/rng-tools: fix uclibc build
@ 2022-08-15 12:43 Fabrice Fontaine
  2022-08-15 13:47 ` Yann E. MORIN
  2022-09-16 12:28 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2022-08-15 12:43 UTC (permalink / raw)
  To: buildroot; +Cc: Matt Weber, Fabrice Fontaine

Fix the following uclibc build failure on aarch64 raised since bump to
version 6.14 in commit 5292d1cf9ad0605cc264fedc75c1b9a169aa183b and
https://github.com/nhorman/rng-tools/commit/9070a04adfcd21ec3839ee8ff190e7130ccd5c9b:

rngd_rndr.c:34:10: fatal error: sys/auxv.h: No such file or directory
   34 | #include <sys/auxv.h>
      |          ^~~~~~~~~~~~

Strangely enough, there is no autobuilder failure for powerpc64le raised
since version bump to version 6.11 in commit
da83261c9be0484924c845bb033e2ca752556504

Fixes:
 - http://autobuild.buildroot.org/results/41d5ab9e67eb0d8af8d789fc94d4366f130a7fb2

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...gure.ac-fix-build-without-sys-auxv.h.patch | 52 +++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 package/rng-tools/0001-configure.ac-fix-build-without-sys-auxv.h.patch

diff --git a/package/rng-tools/0001-configure.ac-fix-build-without-sys-auxv.h.patch b/package/rng-tools/0001-configure.ac-fix-build-without-sys-auxv.h.patch
new file mode 100644
index 0000000000..0c15ab6b7d
--- /dev/null
+++ b/package/rng-tools/0001-configure.ac-fix-build-without-sys-auxv.h.patch
@@ -0,0 +1,52 @@
+From 6ea89861c300a732d1bbcffd085d92f5c4c9228e Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Mon, 15 Aug 2022 11:57:21 +0200
+Subject: [PATCH] configure.ac: fix build without sys/auxv.h
+
+Fix the following build failure on aarch64 without sys/auxv.h (e.g. on
+uclibc) raised since version 6.13 and
+https://github.com/nhorman/rng-tools/commit/9070a04adfcd21ec3839ee8ff190e7130ccd5c9b:
+
+rngd_rndr.c:34:10: fatal error: sys/auxv.h: No such file or directory
+   34 | #include <sys/auxv.h>
+      |          ^~~~~~~~~~~~
+
+The same issue could be raised on powerpc64le since version 6.11 and
+https://github.com/nhorman/rng-tools/commit/ade348cdb90c25b44b203fd4e9c33ec4bccff323
+
+Fixes:
+ - http://autobuild.buildroot.org/results/41d5ab9e67eb0d8af8d789fc94d4366f130a7fb2
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Retrieved from:
+https://github.com/nhorman/rng-tools/commit/6ea89861c300a732d1bbcffd085d92f5c4c9228e]
+---
+ configure.ac | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0af64e7..411c7b8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -76,14 +76,17 @@ AC_PROG_GCC_TRADITIONAL
+ 
+ AX_PTHREAD
+ 
++dnl Checks for header files.
++AC_CHECK_HEADERS(sys/auxv.h)
++
+ AM_CONDITIONAL([RDRAND], [test $host_cpu = x86_64 || test $host_cpu = i686])
+ AS_IF([test $host_cpu = x86_64 || test $host_cpu = i686], [AC_DEFINE([HAVE_RDRAND],1,[Enable RDRAND])],[])
+ 
+-AM_CONDITIONAL([DARN], [test $host_cpu = powerpc64le])
+-AS_IF([test $host_cpu = powerpc64le], [AC_DEFINE([HAVE_DARN],1,[Enable DARN])],[])
++AM_CONDITIONAL([DARN], [test $host_cpu = powerpc64le -a "$ac_cv_header_sys_auxv_h" = "yes"])
++AS_IF([test $host_cpu = powerpc64le -a "$ac_cv_header_sys_auxv_h" = "yes"], [AC_DEFINE([HAVE_DARN],1,[Enable DARN])],[])
+ 
+-AM_CONDITIONAL([RNDR], [test $host_cpu = aarch64])
+-AS_IF([test $host_cpu = aarch64], [AC_DEFINE([HAVE_RNDR],1,[Enable RNDR])],[])
++AM_CONDITIONAL([RNDR], [test $host_cpu = aarch64 -a "$ac_cv_header_sys_auxv_h" = "yes"])
++AS_IF([test $host_cpu = aarch64 -a "$ac_cv_header_sys_auxv_h" = "yes"], [AC_DEFINE([HAVE_RNDR],1,[Enable RNDR])],[])
+ AM_CONDITIONAL([JITTER], [false])
+ 
+ AC_ARG_ENABLE(jitterentropy,
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-16 12:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-15 12:43 [Buildroot] [PATCH 1/1] package/rng-tools: fix uclibc build Fabrice Fontaine
2022-08-15 13:47 ` Yann E. MORIN
2022-09-16 12:28 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.