sdl12-compat: cmake: add '-static-libgcc -lgcc' to mingw builds:

From bc754b6280ad24632e8bf9882cee74bb7f812b3d Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sat, 12 Jun 2021 10:03:40 +0300
Subject: [PATCH] cmake: add '-static-libgcc -lgcc' to mingw builds:

libgcc is needed for 32 bit (x86) builds.
FIXME: MSVC builds linkage needs fixing, too.
---
 CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1459c91..b30d275 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -75,6 +75,7 @@ endif()
 
 if(MINGW)
     set_target_properties(SDL PROPERTIES LINK_FLAGS "-nostdlib")
+    target_link_libraries(SDL PRIVATE "-static-libgcc -lgcc") # libgcc is needed for 32 bit (x86) builds
 endif()
 if(MSVC)
     # Don't try to link with the default set of libraries.