build(Archlinux): Update GCC version in PKGBUILD to 15 (#4546)

Bump the _gcc_version variable from 14 to 15 and change makedepends to use the generic 'gcc' package. This ensures the package builds with the latest GCC version available.
This commit is contained in:
David Lane 2025-12-29 20:16:28 -05:00 committed by GitHub
commit 2e68762e36
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 6 deletions

View file

@ -20,6 +20,11 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-restrict) list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-restrict)
endif() endif()
endif() endif()
# GCC 15 will complain about uninitialized variables in some cases (Simple-Web-Server)
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15)
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-uninitialized)
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# Clang specific compile options # Clang specific compile options

View file

@ -17,7 +17,16 @@ url=@PROJECT_HOMEPAGE_URL@
license=('GPL-3.0-only') license=('GPL-3.0-only')
install=sunshine.install install=sunshine.install
_gcc_version=14 # this variable remains for future cases where we need an older version of gcc for cuda compatibility
_gcc_version=15
_versioned_gcc=false # set to true if we need a versioned gcc, e.g. gcc14
_gcc_dep_suffix=""
_gcc_env_suffix=""
if [ "${_versioned_gcc}" = true ]; then
_gcc_dep_suffix="${_gcc_version}"
_gcc_env_suffix="-${_gcc_version}"
fi
depends=( depends=(
'avahi' 'avahi'
@ -48,7 +57,7 @@ makedepends=(
'appstream-glib' 'appstream-glib'
'cmake' 'cmake'
'desktop-file-utils' 'desktop-file-utils'
"gcc${_gcc_version}" "gcc${_gcc_dep_suffix}"
'git' 'git'
'make' 'make'
'nodejs' 'nodejs'
@ -109,8 +118,8 @@ build() {
export BUILD_VERSION="@BUILD_VERSION@" export BUILD_VERSION="@BUILD_VERSION@"
export COMMIT="${_commit}" export COMMIT="${_commit}"
export CC="gcc-${_gcc_version}" export CC="gcc${_gcc_env_suffix}"
export CXX="g++-${_gcc_version}" export CXX="g++${_gcc_env_suffix}"
export CFLAGS="${CFLAGS/-Werror=format-security/}" export CFLAGS="${CFLAGS/-Werror=format-security/}"
export CXXFLAGS="${CXXFLAGS/-Werror=format-security/}" export CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
@ -165,8 +174,8 @@ build() {
check() { check() {
if [[ "${_run_unit_tests::1}" == "t" ]]; then if [[ "${_run_unit_tests::1}" == "t" ]]; then
export CC="gcc-${_gcc_version}" export CC="gcc${_gcc_env_suffix}"
export CXX="g++-${_gcc_version}" export CXX="g++${_gcc_env_suffix}"
cd "${srcdir}/build/tests" cd "${srcdir}/build/tests"
./test_sunshine --gtest_color=yes --gtest_output=xml:test_results.xml ./test_sunshine --gtest_color=yes --gtest_output=xml:test_results.xml