From 27587312b5935ab887167c30113db6673af101ea Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 12 Feb 2026 08:21:46 -0700 Subject: [PATCH] Fix RISC-V link failure --- vipr.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vipr.spec b/vipr.spec index b895c2e..314b6a0 100644 --- a/vipr.spec +++ b/vipr.spec @@ -43,14 +43,16 @@ cd code %cmake %cmake_build -# For some reason, viprincomp is linked with libsoplex, even though -# -Wl,-as-needed is in the link flags. Relink to drop that dependency. +%if "%{?_lto_cflags}" != "" +# LTO inlines a few functions, leaving viprincomp with unneeded dependencies. +# Relink to drop the unneeded dependencies. cd %{_vpath_builddir} g++ %{build_cxxflags} %{build_ldflags} \ -Wl,--dependency-file=CMakeFiles/viprincomp.dir/link.d \ CMakeFiles/viprincomp.dir/incompletify.cpp.o \ -o viprincomp -lmpfr -lgmp cd ../.. +%endif %install #%%cmake_install does nothing, so install by hand