From 96e55ea11c37ff02acd6f32e104e478fe46bc1be Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Fri, 26 Dec 2025 04:32:05 -0800 Subject: [PATCH] feat(rpcs3): Get it building with Fedora Clang CFLAGS (#8651) (#8654) * feat(rpcs3): Get it building with Fedora Clang CFLAGS * Actually still need this for LLVM versioning * cleanup: Remove unneeded, see what else is needed or not * Update rpcs3.spec * Update rpcs3.spec * Idiot moment * fix: Sed command broke? * Aaaa * cleanup: Flag formatting --------- (cherry picked from commit 653d6df637570a2711221e9de4f620d115db885c) Signed-off-by: Gilver Co-authored-by: Gilver --- anda/games/rpcs3/rpcs3.spec | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/anda/games/rpcs3/rpcs3.spec b/anda/games/rpcs3/rpcs3.spec index 2f67708cc3..931637ac54 100644 --- a/anda/games/rpcs3/rpcs3.spec +++ b/anda/games/rpcs3/rpcs3.spec @@ -1,15 +1,11 @@ -%global _distro_extra_cflags -Wno-uninitialized -%global _distro_extra_cxxflags -include %_includedir/c++/*/cstdint # Define which LLVM/Clang version RPCS3 needs %if 0%{?fedora} >= 45 %global llvm_major 21 %endif +%global toolchain clang # GLIBCXX_ASSERTIONS is known to break RPCS3 -%global build_cflags %(echo %{__build_flags_lang_c} | sed 's/-Wp,-D_GLIBCXX_ASSERTIONS//g') %{?_distro_extra_cflags} -%global build_cxxflags %(echo %{__build_flags_lang_cxx} | sed 's/-Wp,-D_GLIBCXX_ASSERTIONS//g') %{?_distro_extra_cxxflags} -# Need to get rid of everything Clang can't use and undefine -Wunused-command-line-argument where possible due to the project's build flags -%global build_cflags %(echo %{build_cflags} | sed 's:-Werror ::g' | sed 's:-Wunused-command-line-argument ::g' | sed 's:-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 ::g' | sed 's:-specs=/usr/lib/rpm/redhat/redhat-hardened-ld ::g' | sed 's:-specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors ::g' | sed 's:-specs=/usr/lib/rpm/redhat/redhat-package-notes ::g') -Wno-unused-command-line-argument -%global build_cxxflags %(echo %{build_cxxflags} | sed 's:-Werror ::g' | sed 's:-Wunused-command-line-argument ::g' | sed 's:-specs\=/usr/lib/rpm/redhat/redhat-annobin-cc1 ::g' | sed 's:-specs=/usr/lib/rpm/redhat/redhat-hardened-ld ::g' | sed 's:-specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors ::g' | sed 's:-specs=/usr/lib/rpm/redhat/redhat-package-notes ::g') -Wno-unused-command-line-argument +%global build_cflags %(echo "%{__build_flags_lang_c}" | sed 's|-Wp,-D_GLIBCXX_ASSERTIONS ||g') %{?_distro_extra_cflags} +%global build_cxxflags %(echo "%{__build_flags_lang_cxx}" | sed 's|-Wp,-D_GLIBCXX_ASSERTIONS ||g') %{?_distro_extra_cflags} %global commit 77aa5d4bbfc9ab572b678f872bf8083e0dc0725e %global ver 0.0.38-18547 @@ -19,7 +15,7 @@ Release: 1%?dist Summary: PlayStation 3 emulator and debugger License: GPL-2.0-only URL: https://github.com/RPCS3/rpcs3 -%dnl Source0: %url/archive/refs/tags/v%version.tar.gz +Source0: %{url}/archive/%{commit}/%{name}-%{commit}.tar.gz BuildRequires: anda-srpm-macros glew openal-soft cmake vulkan-validation-layers git-core mold BuildRequires: llvm%{?llvm_major}-devel BuildRequires: clang%{?llvm_major}