diff --git a/0001-removed-some-32bit-only-CMake-code.patch b/0001-removed-some-32bit-only-CMake-code.patch new file mode 100644 index 0000000..3bce930 --- /dev/null +++ b/0001-removed-some-32bit-only-CMake-code.patch @@ -0,0 +1,47 @@ +From 9e76faff1f93688d035062913cc29b294b831576 Mon Sep 17 00:00:00 2001 +From: Christoph Oelckers +Date: Thu, 20 Oct 2022 21:11:18 +0200 +Subject: [PATCH] - removed some 32bit only CMake code. + +--- + src/CMakeLists.txt | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +Index: gzdoom-g4.9.0/src/CMakeLists.txt +=================================================================== +--- gzdoom-g4.9.0.orig/src/CMakeLists.txt ++++ gzdoom-g4.9.0/src/CMakeLists.txt +@@ -156,8 +156,33 @@ endif() + + # Decide on SSE setup + ++# SSE only matters on 32-bit targets. We check compiler flags to know if we can do it. ++if( CMAKE_SIZEOF_VOID_P MATCHES "4" AND NOT CMAKE_OSX_ARCHITECTURES MATCHES ppc ) ++ CHECK_CXX_COMPILER_FLAG( "-msse2 -mfpmath=sse" CAN_DO_MFPMATH ) ++ CHECK_CXX_COMPILER_FLAG( -arch:SSE2 CAN_DO_ARCHSSE2 ) ++ if( CAN_DO_MFPMATH ) ++ set( SSE1_ENABLE "-msse -mfpmath=sse" ) ++ set( SSE2_ENABLE "-msse2 -mfpmath=sse" ) ++ elseif( CAN_DO_ARCHSSE2 ) ++ set( SSE1_ENABLE -arch:SSE ) ++ set( SSE2_ENABLE -arch:SSE2 ) ++ endif() ++endif() ++ + if( X64 ) + set( HAVE_MMX 1 ) ++else( X64 ) ++ set( SAFE_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ) ++ ++ if( DEM_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE ) ++ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmmx") ++ endif( DEM_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE ) ++ ++ CHECK_CXX_SOURCE_COMPILES("#include ++ int main(void) { __m64 v = _m_from_int(0); }" ++ HAVE_MMX) ++ ++ set( CMAKE_CXX_FLAGS ${SAFE_CMAKE_CXX_FLAGS} ) + endif( X64 ) + + CHECK_CXX_SOURCE_COMPILES("#include diff --git a/gzdoom.changes b/gzdoom.changes index e96100e..c2200b2 100644 --- a/gzdoom.changes +++ b/gzdoom.changes @@ -7,7 +7,8 @@ Sat Nov 5 19:55:42 UTC 2022 - Jan Engelhardt * The SoftPoly renderer was removed - Delete gzdoom-sdlbug.patch (obsolete), 0001-fix-gzdoom.pk3-not-found-error.patch (merged) -- Add 0001-build-unbreak-compilation-on-Linux.patch +- Add 0001-build-unbreak-compilation-on-Linux.patch, + 0001-removed-some-32bit-only-CMake-code.patch ------------------------------------------------------------------- Mon Oct 24 23:24:06 UTC 2022 - Jan Engelhardt diff --git a/gzdoom.spec b/gzdoom.spec index 4eb2e7a..8a886b7 100644 --- a/gzdoom.spec +++ b/gzdoom.spec @@ -31,6 +31,7 @@ Patch2: gzdoom-lzma.patch Patch3: 0001-build-unbreak-compilation-on-Linux.patch Patch5: gzdoom-vulkan.patch Patch6: gzdoom-discord.patch +Patch8: 0001-removed-some-32bit-only-CMake-code.patch Patch9: 0001-Revert-use-static_assert-to-make-32-bit-builds-fail.patch BuildRequires: cmake >= 2.8.7 BuildRequires: discord-rpc-devel