File glib-2.75.2-fix-linking.patch of Package mingw64-glib2

diff -ur glib-2.72.2.orig/gio/tests/meson.build glib-2.72.2/gio/tests/meson.build
--- glib-2.72.2.orig/gio/tests/meson.build	2022-05-30 15:26:47.000000000 +0200
+++ glib-2.72.2/gio/tests/meson.build	2023-02-13 01:46:37.882003565 +0100
@@ -774,16 +774,26 @@
                  '@INPUT@'])
 
     # Create object file containing resource data
-    test_resources_binary = custom_target('test_resources.o',
-      input : test_gresource_binary,
-      output : 'test_resources.o',
-      command : [ld,
-                 '-z', 'noexecstack',
-                 '-r',
-                 '-b','binary',
-                 '@INPUT@',
-                 '-o','@OUTPUT@'])
-
+    if host_system == 'windows'
+      test_resources_binary = custom_target('test_resources.o',
+        input : test_gresource_binary,
+        output : 'test_resources.o',
+        command : [ld,
+                  '-r',
+                  '-b','binary',
+                  '@INPUT@',
+                  '-o','@OUTPUT@'])
+    else
+      test_resources_binary = custom_target('test_resources.o',
+        input : test_gresource_binary,
+        output : 'test_resources.o',
+        command : [ld,
+                  '-z', 'noexecstack',
+                  '-r',
+                  '-b','binary',
+                  '@INPUT@',
+                  '-o','@OUTPUT@'])
+    endif
     # Rename symbol to match the one in the C file
     if cc.get_id() == 'gcc' and host_system == 'windows'
       underscore = '_'
openSUSE Build Service is sponsored by