public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/jitterentropy] rawhide: Fix riscv64 build
@ 2026-09-30 14:29 Andrea Bolognani
  0 siblings, 0 replies; only message in thread
From: Andrea Bolognani @ 2026-09-30 14:29 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/jitterentropy
            Branch : rawhide
            Commit : b89faa09e5691de49de2bcc8e5201497e75581bd
            Author : Andrea Bolognani <abologna@redhat.com>
            Date   : 2026-09-17T14:07:05+02:00
            Stats  : +18/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/jitterentropy/c/b89faa09e5691de49de2bcc8e5201497e75581bd?branch=rawhide

            Log:
            Fix riscv64 build

_DEFAULT_SOURCE needs to be defined for clock_gettime() and
related symbols to be visible on riscv64.

Upstream has already reworked the code so that the define is
present in one of the headers, so this patch is only needed as
a stop-gap measure until the next upstream release is imported
and can safely be dropped afterwards.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>

---
diff --git a/jitterentropy-riscv64.patch b/jitterentropy-riscv64.patch
new file mode 100644
index 0000000..ed81b5c
--- /dev/null
+++ b/jitterentropy-riscv64.patch
@@ -0,0 +1,11 @@
+diff -Naur Makefile.orig Makefile
+--- Makefile.orig	2026-09-17 13:58:07.312254370 +0200
++++ Makefile	2026-09-17 13:58:27.802113626 +0200
+@@ -5,6 +5,7 @@
+ ENABLE_STACK_PROTECTOR ?= 1
+ CFLAGS ?= -fwrapv --param ssp-buffer-size=4 -fvisibility=hidden -fPIE -Wcast-align -Wmissing-field-initializers -Wshadow -Wswitch-enum
+ CFLAGS +=-Wp,-U_FORTIFY_SOURCE -Wextra -Wall -pedantic -fPIC -O0 -fwrapv -Wconversion -std=c11
++CFLAGS +=-D_DEFAULT_SOURCE
+ LDFLAGS +=-Wl,-z,relro,-z,now -lpthread
+ 
+ # Enable internal timer support

diff --git a/jitterentropy.spec b/jitterentropy.spec
index f981026..7714ec2 100644
--- a/jitterentropy.spec
+++ b/jitterentropy.spec
@@ -1,7 +1,7 @@
 %global libjit_soversion 3
 Name:           jitterentropy
 Version:        3.7.0
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Library implementing the jitter entropy source
 
 License:        BSD-3-Clause OR GPL-2.0-only
@@ -17,6 +17,9 @@ Patch0: jitterentropy-rh-makefile.patch
 Patch1: jitterentropy-powerpc.patch
 # Restore previous jitterentropy public api
 Patch2: jitterentropy-api.patch
+# _DEFAULT_SOURCE is needed for clock_gettime() on riscv64
+# TODO drop when the next upstream release is imported
+Patch3: jitterentropy-riscv64.patch
 
 %description
 Library implementing the CPU jitter entropy source
@@ -50,6 +53,9 @@ mkdir -p %{buildroot}%{_includedir}
 %{_mandir}/man3/*
 
 %changelog
+* Thu Sep 17 2026 Andrea Bolognani <abologna@redhat.com> - 3.7.0-5
+- Fix riscv64 build
+
 * Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.0-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-30 14:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-30 14:29 [rpms/jitterentropy] rawhide: Fix riscv64 build Andrea Bolognani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox