Compare commits

3 Commits

Author SHA1 Message Date
bb95510603 Add rocsolver/test directory to test package
Signed-off-by: Egbert Eich <eich@suse.com>
2025-08-19 15:02:15 +02:00
9f20859e66 Fix buildinfo and compiler flags handling for SUSE
When building without debug support, remove `-g` flag
from compiler arguments.
Also make sure the %build_cxxflags macro is used. SUSE
doesn't use it by default.

Signed-off-by: Egbert Eich <eich@suse.com>
2025-08-11 16:18:11 +02:00
bfd8ee5f1b On SUSE use __builder flag to switch to Ninja
Signed-off-by: Egbert Eich <eich@suse.com>
2025-08-10 18:54:52 +02:00

View File

@@ -15,11 +15,18 @@
%global build_cxxflags %(echo %{optflags} | sed -e 's/-fstack-protector-strong/-Xarch_host -fstack-protector-strong/' -e 's/-fcf-protection/-Xarch_host -fcf-protection/' -e 's/-mtls-dialect=gnu2//')
%bcond_with debug
%if 0%{?suse_version}
%if %{without debug}
%global build_type RELEASE
%global build_cxxflags %(echo %{optflags} | sed -e 's/-g\\( \\|$\\)/ /')
%endif
%else
%if %{with debug}
%global build_type DEBUG
%else
%global build_type RelWithDebInfo
%endif
%endif
%bcond_without compress
%if %{with compress}
@@ -56,9 +63,11 @@
%endif
%if %{with ninja}
%global cmake_generator -G Ninja
%if 0%{?suse_version}
%define __builder ninja
%else
%global cmake_generator %{nil}
%global cmake_generator -G Ninja
%endif
%endif
# export an llvm compilation database
@@ -72,7 +81,7 @@
Name: %{rocsolver_name}
Version: %{rocm_version}
Release: 3%{?dist}
Release: 5%{?dist}
Summary: Next generation LAPACK implementation for ROCm platform
Url: https://github.com/ROCm/rocSOLVER
@@ -240,13 +249,14 @@ if [ "$LINK_JOBS" -lt "$JOBS" ]; then
JOBS=$LINK_JOBS
fi
%cmake %{cmake_generator} \
%{?suse_version:%{?build_cxxflags:CXXFLAGS="%{build_cxxflags}"}}
%cmake %{?cmake_generator} \
-DCMAKE_CXX_COMPILER=hipcc \
-DCMAKE_C_COMPILER=hipcc \
-DCMAKE_LINKER=%rocmllvm_bindir/ld.lld \
-DCMAKE_AR=%rocmllvm_bindir/llvm-ar \
-DCMAKE_RANLIB=%rocmllvm_bindir/llvm-ranlib \
-DCMAKE_BUILD_TYPE=%{build_type} \
%{?build_type:-DCMAKE_BUILD_TYPE=%{build_type}} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=%{build_compile_db} \
-DCMAKE_PREFIX_PATH=%{rocmllvm_cmakedir}/.. \
-DCMAKE_SKIP_RPATH=ON \
@@ -289,11 +299,19 @@ fi
%if %{with test}
%files test
%dir %{_datadir}/rocsolver
%dir %{_datadir}/rocsolver/test
%{_datadir}/rocsolver/test/*
%{_bindir}/rocsolver*
%endif
%changelog
* Fri Aug 15 2025 Egbert Eich <eich@suse.com> - 6.4.2-5
- Add rocsolver/test directory to test package.
* Sun Aug 10 2025 Egbert Eich <eich@suse.com> - 6.4.2-4
- On SUSE use __builder flag to switch to Ninja
- Fix buildinfo and compiler flags handling for SUSE.
* Wed Aug 6 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.2-3
- Default build type RelWithDebInfo