File sleef.spec of Package failed_sleef

Name:           sleef
Version:        3.9.0
Release:        1%{?dist}
Summary:        SIMD Library for Evaluating Elementary Functions

License:        MIT
URL:            https://github.com/shibatch/sleef
Source0:        sleef-3.9.0.tar.gz

BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  cmake
BuildRequires:  make
BuildRequires:  pkgconfig
BuildRequires:  blas-devel
BuildRequires:  libgomp-devel

%description
SLEEF (SIMD Library for Evaluating Elementary Functions) provides vectorized
implementations of math functions.

%prep
%setup -q

%build
# Disable LTO to avoid "lto1: fatal error: target specific builtin not available"
# by forcing the compiler to not use link-time optimization (last option wins).
export CFLAGS="$CFLAGS -fno-lto"
export CXXFLAGS="$CXXFLAGS -fno-lto"
# Use CMake to configure and build
%cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DSLEEF_BUILD_SHARED=ON .
%make_build

%install
%make_install

%files
%license LICENSE
%doc README.md
%{_libdir}/libsleef.so.*
%{_includedir}/sleef.h

%changelog
* Thu Aug 15 2025 Repair Bot <repair@example.com> - 3.9.0-1
- Disable LTO during build to avoid lto-wrapper failures on riscv64
openSUSE Build Service is sponsored by