From 7259deaafa7f4c5a2646d6fe38b16e8fd3ad6049 Mon Sep 17 00:00:00 2001 From: laokz Date: Sun, 8 Oct 2023 19:42:42 +0800 Subject: [PATCH] riscv64: add CFLAGS to workaround fragile test-strptime This test cannot always get intended result due to different user address space layout among different archs. --- mandoc.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mandoc.spec b/mandoc.spec index 7f29857..3910d7b 100644 --- a/mandoc.spec +++ b/mandoc.spec @@ -1,6 +1,6 @@ Name: mandoc Version: 1.14.6 -Release: 2 +Release: 3 Summary: A suite of tools for compiling mdoc and man License: ISC @@ -70,7 +70,11 @@ echo 'INSTALL_DATA="${INSTALL} -m 0644"' >> configure.local echo 'INSTALL_LIBMANDOC=1' >> configure.local +%ifarch riscv64 +echo 'CFLAGS="%{optflags} -fPIC -Werror=implicit-function-declaration"' >> configure.local +%else echo 'CFLAGS="%{optflags} -fPIC"' >> configure.local +%endif export CC=clang ./configure %make_build @@ -220,6 +224,8 @@ fi %{_mandir}/man3/tbl.3* %changelog +* Mon Oct 9 2023 laokz - 1.14.6-3 +- add CFLAGS for riscv64 to workaround fragile test-strptime.c * Thu Apr 6 2023 changzhangm - 1.14.6-2 - Update to 1.14.6-2 * Fri Sep 23 2022 chendexi - 1.14.6-1