Skip to content

Commit fe50965

Browse files
build(linux): enable fedora 42
1 parent ccce4ed commit fe50965

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

packaging/linux/fedora/Sunshine.spec

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ BuildRequires: which
5454
BuildRequires: xorg-x11-server-Xvfb
5555

5656
# Conditional BuildRequires for cuda-gcc based on Fedora version
57-
%if 0%{?fedora} >= 40
58-
# this package conflicts with gcc on f39
57+
%if 0%{?fedora} >= 40 && 0%{?fedora} <= 41
58+
# this package conflicts with gcc on f39, and doesn't work on f42
5959
BuildRequires: cuda-gcc-c++
6060
%endif
6161

@@ -96,10 +96,15 @@ cuda_supported_architectures=("x86_64" "aarch64")
9696

9797
# set cuda_version based on Fedora version
9898
case "$fedora_version" in
99-
*)
99+
40|41)
100100
cuda_version="12.6.3"
101101
cuda_build="560.35.05"
102102
;;
103+
*)
104+
# cuda is not supported on this version
105+
cuda_version=""
106+
cuda_build=""
107+
;;
103108
esac
104109

105110
# prepare CMAKE args
@@ -161,16 +166,16 @@ function install_cuda() {
161166
rm "%{_builddir}/cuda.run"
162167
}
163168

164-
# we need to clear these flags to avoid linkage errors with cuda-gcc-c++
165-
export CFLAGS=""
166-
export CXXFLAGS=""
167-
export FFLAGS=""
168-
export FCFLAGS=""
169-
export LDFLAGS=""
170-
export CC=gcc-13
171-
export CXX=g++-13
172-
173169
if [ -n "$cuda_version" ] && [[ " ${cuda_supported_architectures[@]} " =~ " ${architecture} " ]]; then
170+
# we need to clear these flags to avoid linkage errors with cuda-gcc-c++
171+
export CFLAGS=""
172+
export CXXFLAGS=""
173+
export FFLAGS=""
174+
export FCFLAGS=""
175+
export LDFLAGS=""
176+
export CC=gcc-13
177+
export CXX=g++-13
178+
174179
install_cuda
175180
cmake_args+=("-DSUNSHINE_ENABLE_CUDA=ON")
176181
cmake_args+=("-DCMAKE_CUDA_COMPILER:PATH=%{_builddir}/cuda/bin/nvcc")

0 commit comments

Comments
 (0)