feat(rpcs3): Get it building with Fedora Clang CFLAGS (#8651)

* feat(rpcs3): Get it building with Fedora Clang CFLAGS

Signed-off-by: Gilver <rockgrub@disroot.org>

* Actually still need this for LLVM versioning

Signed-off-by: Gilver <rockgrub@disroot.org>

* cleanup: Remove unneeded, see what else is needed or not

Signed-off-by: Gilver <rockgrub@disroot.org>

* Update rpcs3.spec

Signed-off-by: Gilver <rockgrub@disroot.org>

* Update rpcs3.spec

Signed-off-by: Gilver <rockgrub@disroot.org>

* Idiot moment

Signed-off-by: Gilver <rockgrub@disroot.org>

* fix: Sed command broke?

Signed-off-by: Gilver <rockgrub@disroot.org>

* Aaaa

Signed-off-by: Gilver <rockgrub@disroot.org>

* cleanup: Flag formatting

Signed-off-by: Gilver <rockgrub@disroot.org>

---------

Signed-off-by: Gilver <rockgrub@disroot.org>
This commit is contained in:
Gilver
2025-12-26 05:48:50 -06:00
committed by GitHub
parent 26ab377e95
commit 653d6df637
+4 -8
View File
@@ -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}