summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0/glib-2.0
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib-2.0')
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch39
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch75
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch4
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch7
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch5
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch43
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Switch-from-the-deprecated-distutils-module-to-the-p.patch34
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-codegen.py-bump-timeout-to-100-seconds.patch26
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch7
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-gobject-Drop-use-of-volatile-from-get_type-macros.patch403
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch7
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch29
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-tests-codegen.py-removing-unecessary-print-statement.patch38
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Fix-non-atomic-access-to-a-shared-variable.patch44
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0003-tests-Fix-non-atomic-access-to-a-shared-variable.patch90
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0004-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch93
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0005-tests-Fix-non-atomic-access-to-some-shared-variables.patch702
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0006-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch35
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0007-gdbusconnection-Drop-unnecessary-volatile-qualifiers.patch111
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0008-gdbuserror-Drop-unnecessary-volatile-qualifiers-from.patch95
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0009-gio-Drop-unnecessary-volatile-qualifiers-from-intern.patch207
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch7
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0010-kqueue-Fix-unlocked-access-to-shared-variable.patch51
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0011-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch126
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0012-tests-Fix-non-atomic-access-to-some-shared-variables.patch103
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0013-gatomic-Drop-unnecessary-volatile-qualifiers-from-in.patch180
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0014-gatomic-Drop-unnecessary-volatile-qualifiers-from-ma.patch56
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0015-glib-Drop-unnecessary-volatile-qualifiers-from-inter.patch169
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0016-gobject-Drop-unnecessary-volatile-qualifiers-from-in.patch126
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0017-gmessages-Drop-unnecessary-volatile-qualifiers-from-.patch44
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0018-gtypes-Drop-volatile-qualifier-from-gatomicrefcount.patch35
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0019-gatomicarray-Drop-volatile-qualifier-from-GAtomicArr.patch44
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0020-gobject-Drop-volatile-qualifier-from-GObject.ref_cou.patch33
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0021-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch51
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0022-build-Drop-unnecessary-volatile-qualifiers-from-conf.patch38
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0023-gdbusprivate-Avoid-a-warning-about-a-statement-with-.patch33
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0024-tests-Add-comment-to-volatile-atomic-tests.patch49
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0025-gthread-Use-g_atomic-primitives-correctly-in-destruc.patch77
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0026-gtype-Fix-some-typos-in-comments.patch47
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0027-gtype-Add-some-missing-atomic-accesses-to-init_state.patch76
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0028-gresource-Fix-a-pointer-mismatch-with-an-atomic-load.patch29
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0029-docs-Document-not-to-use-volatile-qualifiers.patch258
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch121
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch54
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/memory-monitor.patch361
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc1
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch46
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/run-ptest3
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/skip-timeout.patch32
49 files changed, 599 insertions, 3745 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch
deleted file mode 100644
index f3a0069633..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 658c034d92027dc8af5f784cae852123fac79b19 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 16 Apr 2016 13:28:59 -0700
-Subject: [PATCH] Do not ignore return value of write()
-
-gcc warns about ignoring return value when compiling
-with fortify turned on.
-
-assert when write() fails
-
-Upstream-Status: Submitted
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- glib/tests/unix.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/glib/tests/unix.c b/glib/tests/unix.c
-index 7639d06..f941141 100644
---- a/glib/tests/unix.c
-+++ b/glib/tests/unix.c
-@@ -33,14 +33,15 @@ test_pipe (void)
- GError *error = NULL;
- int pipefd[2];
- char buf[1024];
-- gssize bytes_read;
-+ gssize bytes_read, bytes_written;
- gboolean res;
-
- res = g_unix_open_pipe (pipefd, FD_CLOEXEC, &error);
- g_assert (res);
- g_assert_no_error (error);
-
-- write (pipefd[1], "hello", sizeof ("hello"));
-+ bytes_written = write (pipefd[1], "hello", sizeof ("hello"));
-+ g_assert (bytes_written != -1 && "write() failed");
- memset (buf, 0, sizeof (buf));
- bytes_read = read (pipefd[0], buf, sizeof(buf) - 1);
- g_assert_cmpint (bytes_read, >, 0);
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch
index 5fe3aa898e..8e6598fbef 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch
@@ -1,4 +1,4 @@
-From 0797a40627a4cb5439a24b872edc65356dceaaf0 Mon Sep 17 00:00:00 2001
+From e7077aa23bfcd31a8e72e39dc93ce4f854678376 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 15 Feb 2019 11:17:27 +0100
Subject: [PATCH] Do not write $bindir into pkg-config files
@@ -9,53 +9,52 @@ rather than use target paths).
Upstream-Status: Inappropriate [upstream wants the paths in .pc files]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
---
gio/meson.build | 16 ++++++++--------
glib/meson.build | 6 +++---
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/gio/meson.build b/gio/meson.build
-index 532b086..98468a3 100644
+index 5f91586..1a95f4f 100644
--- a/gio/meson.build
+++ b/gio/meson.build
-@@ -820,14 +820,14 @@ pkg.generate(libgio,
- 'schemasdir=' + join_paths('${datadir}', schemas_subdir),
- 'bindir=' + join_paths('${prefix}', get_option('bindir')),
- 'giomoduledir=' + pkgconfig_giomodulesdir,
-- 'gio=' + join_paths('${bindir}', 'gio'),
-- 'gio_querymodules=' + join_paths('${bindir}', 'gio-querymodules'),
-- 'glib_compile_schemas=' + join_paths('${bindir}', 'glib-compile-schemas'),
-- 'glib_compile_resources=' + join_paths('${bindir}', 'glib-compile-resources'),
-- 'gdbus=' + join_paths('${bindir}', 'gdbus'),
-- 'gdbus_codegen=' + join_paths('${bindir}', 'gdbus-codegen'),
-- 'gresource=' + join_paths('${bindir}', 'gresource'),
-- 'gsettings=' + join_paths('${bindir}', 'gsettings')],
-+ 'gio=gio',
-+ 'gio_querymodules=gio-querymodules',
-+ 'glib_compile_schemas=glib-compile-schemas',
-+ 'glib_compile_resources=glib-compile-resources',
-+ 'gdbus=gdbus',
-+ 'gdbus_codegen=gdbus-codegen',
-+ 'gresource=gresource',
-+ 'gsettings=gsettings'],
+@@ -884,14 +884,14 @@ pkg.generate(libgio,
+ 'dtdsdir=' + '${datadir}' / dtds_subdir,
+ 'bindir=' + '${prefix}' / get_option('bindir'),
+ 'giomoduledir=' + pkgconfig_giomodulesdir,
+- 'gio=' + '${bindir}' / 'gio',
+- 'gio_querymodules=' + pkgconfig_multiarch_bindir / 'gio-querymodules',
+- 'glib_compile_schemas=' + pkgconfig_multiarch_bindir / 'glib-compile-schemas',
+- 'glib_compile_resources=' + '${bindir}' / 'glib-compile-resources',
+- 'gdbus=' + '${bindir}' /'gdbus',
+- 'gdbus_codegen=' + '${bindir}' / 'gdbus-codegen',
+- 'gresource=' + '${bindir}' / 'gresource',
+- 'gsettings=' + '${bindir}' / 'gsettings',
++ 'gio=gio',
++ 'gio_querymodules=gio-querymodules',
++ 'glib_compile_schemas=glib-compile-schemas',
++ 'glib_compile_resources=glib-compile-resources',
++ 'gdbus=gdbus',
++ 'gdbus_codegen=gdbus-codegen',
++ 'gresource=gresource',
++ 'gsettings=gsettings',
+ ],
version : glib_version,
install_dir : glib_pkgconfigreldir,
- filebase : 'gio-2.0',
diff --git a/glib/meson.build b/glib/meson.build
-index aaf5f00..1e0992b 100644
+index c26a35e..1d8ca6b 100644
--- a/glib/meson.build
+++ b/glib/meson.build
-@@ -375,9 +375,9 @@ pkg.generate(libglib,
- subdirs : ['glib-2.0'],
- extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags,
- variables : ['bindir=' + join_paths('${prefix}', get_option('bindir')),
-- 'glib_genmarshal=' + join_paths('${bindir}', 'glib-genmarshal'),
-- 'gobject_query=' + join_paths('${bindir}', 'gobject-query'),
-- 'glib_mkenums=' + join_paths('${bindir}', 'glib-mkenums')],
-+ 'glib_genmarshal=glib-genmarshal',
-+ 'gobject_query=gobject-query',
-+ 'glib_mkenums=glib-mkenums'],
- version : glib_version,
- install_dir : glib_pkgconfigreldir,
- filebase : 'glib-2.0',
+@@ -447,9 +447,9 @@ pkg.generate(libglib,
+ variables : [
+ 'bindir=' + '${prefix}' / get_option('bindir'),
+ 'datadir=' + '${prefix}' / get_option('datadir'),
+- 'glib_genmarshal=' + '${bindir}' / 'glib-genmarshal',
+- 'gobject_query=' + '${bindir}' / 'gobject-query',
+- 'glib_mkenums=' + '${bindir}' / 'glib-mkenums',
++ 'glib_genmarshal=glib-genmarshal',
++ 'gobject_query=gobject-query',
++ 'glib_mkenums=glib-mkenums',
+ 'glib_valgrind_suppressions=' + '${datadir}' /
+ valgrind_suppression_file_install_subdir /
+ fs.name(valgrind_suppression_file),
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch
index 16f2d31496..eb9dfdbcf9 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch
@@ -1,4 +1,4 @@
-From c94e669de98a3892c699bd8d0d2b5164b2de747e Mon Sep 17 00:00:00 2001
+From 9a5d4bf65b658d744d610ee27ecd2ae65b14b158 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 15 Mar 2014 22:42:29 -0700
Subject: [PATCH] Fix DATADIRNAME on uclibc/Linux
@@ -8,8 +8,6 @@ based systems therefore lets set DATADIRNAME to "share".
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
-
-
---
m4macros/glib-gettext.m4 | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch
index 597864d9ac..ad69f7ec65 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch
@@ -1,4 +1,4 @@
-From 0015db45cd1bfefc04959dffab5dabeead93136f Mon Sep 17 00:00:00 2001
+From 4933aef791857a5aac650b60af800778658b875b Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Tue, 22 Mar 2016 15:14:58 +0200
Subject: [PATCH] Install gio-querymodules as libexec_PROGRAM
@@ -8,16 +8,15 @@ renamer does not cope with library packages with files in ${bindir}
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Upstream-Status: Inappropriate [OE specific]
-
---
gio/meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/gio/meson.build b/gio/meson.build
-index 2ef60ed..532b086 100644
+index f9fdf6e..5f91586 100644
--- a/gio/meson.build
+++ b/gio/meson.build
-@@ -936,6 +936,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu
+@@ -1005,6 +1005,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu
c_args : gio_c_args,
# intl.lib is not compatible with SAFESEH
link_args : noseh_link_args,
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch
index 6fd93526ce..0e3a62af6a 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch
@@ -1,4 +1,4 @@
-From 4f47b8a8d650d185aa61aec2f56a283522a723c4 Mon Sep 17 00:00:00 2001
+From 8ae2e9c2a04e089306693a021149dc6b7d1bd679 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 12 Jun 2015 17:08:46 +0300
Subject: [PATCH] Remove the warning about deprecated paths in schemas
@@ -9,13 +9,12 @@ messages, and meta/lib/oe/rootfs.py complaints about them.
Upstream-Status: Inappropriate
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
---
gio/glib-compile-schemas.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c
-index 7888120..7acbd5b 100644
+index 04ef404..e791ce2 100644
--- a/gio/glib-compile-schemas.c
+++ b/gio/glib-compile-schemas.c
@@ -1232,19 +1232,6 @@ parse_state_start_schema (ParseState *state,
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch
index d6765b163b..32b4cea409 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch
@@ -1,32 +1,30 @@
-From 333809ded70ad4e3470b7134e3fac1a42ff48e61 Mon Sep 17 00:00:00 2001
+From c0733f7a91dfe13152abc60c5a3064456b3e9d63 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Wed, 13 Feb 2019 15:32:05 +0100
Subject: [PATCH] Set host_machine correctly when building with mingw32
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
---
gio/tests/meson.build | 8 ++++----
glib/tests/meson.build | 2 +-
meson.build | 3 +++
- tests/meson.build | 2 +-
- 4 files changed, 9 insertions(+), 6 deletions(-)
+ 3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/gio/tests/meson.build b/gio/tests/meson.build
-index 3a19c82..b762835 100644
+index 4ef3343..e498e7e 100644
--- a/gio/tests/meson.build
+++ b/gio/tests/meson.build
-@@ -12,7 +12,7 @@ test_c_args = [
- '-UG_DISABLE_ASSERT',
- ]
+@@ -29,7 +29,7 @@ endif
+
+ test_cpp_args = test_c_args
-if host_machine.system() == 'windows'
+if host_system == 'windows'
common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')]
endif
-@@ -133,7 +133,7 @@ else
+@@ -230,7 +230,7 @@ if have_dbus_daemon
endif
# Test programs buildable on UNIX only
@@ -34,8 +32,8 @@ index 3a19c82..b762835 100644
+if host_system != 'windows'
gio_tests += {
'file' : {},
- 'gdbus-peer' : {
-@@ -385,7 +385,7 @@ if host_machine.system() != 'windows'
+ 'gdbus-peer-object-manager' : {},
+@@ -562,7 +562,7 @@ if host_machine.system() != 'windows'
endif # unix
# Test programs buildable on Windows only
@@ -44,7 +42,7 @@ index 3a19c82..b762835 100644
gio_tests += {'win32-streams' : {}}
endif
-@@ -455,7 +455,7 @@ if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl'
+@@ -632,7 +632,7 @@ if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl'
}
endif
@@ -54,10 +52,10 @@ index 3a19c82..b762835 100644
'gdbus-example-unix-fd-client' : {
'install' : false,
diff --git a/glib/tests/meson.build b/glib/tests/meson.build
-index 6eb23e8..36eb919 100644
+index d80c86e..5329cda 100644
--- a/glib/tests/meson.build
+++ b/glib/tests/meson.build
-@@ -137,7 +137,7 @@ if glib_conf.has('HAVE_EVENTFD')
+@@ -216,7 +216,7 @@ if glib_conf.has('HAVE_EVENTFD')
}
endif
@@ -67,10 +65,10 @@ index 6eb23e8..36eb919 100644
glib_tests += {
'gpoll' : {
diff --git a/meson.build b/meson.build
-index 47f3a5c..7ea7ad1 100644
+index 813c9b7..6ee775e 100644
--- a/meson.build
+++ b/meson.build
-@@ -32,6 +32,9 @@ else
+@@ -54,6 +54,9 @@ else
endif
host_system = host_machine.system()
@@ -80,16 +78,3 @@ index 47f3a5c..7ea7ad1 100644
if host_system == 'darwin'
ios_test_code = '''#include <TargetConditionals.h>
-diff --git a/tests/meson.build b/tests/meson.build
-index 6741f8f..12fdc90 100644
---- a/tests/meson.build
-+++ b/tests/meson.build
-@@ -73,7 +73,7 @@ test_extra_programs = {
- 'unicode-collate' : {},
- }
-
--if host_machine.system() != 'windows'
-+if host_system != 'windows'
- tests += {
- 'timeloop' : {},
- 'iochannel-test' : {},
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Switch-from-the-deprecated-distutils-module-to-the-p.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Switch-from-the-deprecated-distutils-module-to-the-p.patch
new file mode 100644
index 0000000000..b11c283e6d
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-Switch-from-the-deprecated-distutils-module-to-the-p.patch
@@ -0,0 +1,34 @@
+From a8eb944a10353403241608a084787f6efcbb2eb7 Mon Sep 17 00:00:00 2001
+From: Jordan Williams <jordan@jwillikers.com>
+Date: Fri, 1 Dec 2023 09:53:50 -0600
+Subject: [PATCH] Switch from the deprecated distutils module to the packaging
+ module
+
+The distutils module was removed in Python 3.12.
+
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/6ef967a0f930ce37a8c9b5aff969693b34714291]
+
+Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
+---
+ gio/gdbus-2.0/codegen/utils.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py
+index 0204610..08f1ba9 100644
+--- a/gio/gdbus-2.0/codegen/utils.py
++++ b/gio/gdbus-2.0/codegen/utils.py
+@@ -19,7 +19,7 @@
+ #
+ # Author: David Zeuthen <davidz@redhat.com>
+
+-import distutils.version
++import packaging.version
+ import os
+ import sys
+
+@@ -166,4 +166,4 @@ def version_cmp_key(key):
+ v = str(key[0])
+ else:
+ v = "0"
+- return (distutils.version.LooseVersion(v), key[1])
++ return (packaging.version.Version(v), key[1])
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-codegen.py-bump-timeout-to-100-seconds.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-codegen.py-bump-timeout-to-100-seconds.patch
deleted file mode 100644
index 508c8c3bad..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-codegen.py-bump-timeout-to-100-seconds.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From b833254bcc9fcf4cdc2572027b1154d799535ca4 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Sun, 20 Dec 2020 22:01:43 +0100
-Subject: [PATCH] gio/tests/codegen.py: bump timeout to 100 seconds
-
-This may be necessary on overloaded CI systems.
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- gio/tests/codegen.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gio/tests/codegen.py b/gio/tests/codegen.py
-index 51de0ed..ca98c9d 100644
---- a/gio/tests/codegen.py
-+++ b/gio/tests/codegen.py
-@@ -51,7 +51,7 @@ class TestCodegen(unittest.TestCase):
- cwd = ''
-
- def setUp(self):
-- self.timeout_seconds = 10 # seconds per test
-+ self.timeout_seconds = 100 # seconds per test
- self.tmpdir = tempfile.TemporaryDirectory()
- self.cwd = os.getcwd()
- os.chdir(self.tmpdir.name)
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch
index d33fdd4d8b..aee2986033 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch
@@ -1,4 +1,4 @@
-From 92de6c7eb30b961b24a2dce812d5276487b7d23d Mon Sep 17 00:00:00 2001
+From 878e51f82100c698236fda0e069e14ea9249350c Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Wed, 8 Jan 2020 18:22:46 +0100
Subject: [PATCH] gio/tests/resources.c: comment out a build host-only test
@@ -8,16 +8,15 @@ not cross-compatible (hardcodes ld and objcopy).
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
---
gio/tests/resources.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gio/tests/resources.c b/gio/tests/resources.c
-index c44d214..e289a01 100644
+index f567914..b21b616 100644
--- a/gio/tests/resources.c
+++ b/gio/tests/resources.c
-@@ -993,7 +993,7 @@ main (int argc,
+@@ -1068,7 +1068,7 @@ main (int argc,
g_test_add_func ("/resource/automatic", test_resource_automatic);
/* This only uses automatic resources too, so it tests the constructors and destructors */
g_test_add_func ("/resource/module", test_resource_module);
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-gobject-Drop-use-of-volatile-from-get_type-macros.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-gobject-Drop-use-of-volatile-from-get_type-macros.patch
deleted file mode 100644
index 4852186520..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-gobject-Drop-use-of-volatile-from-get_type-macros.patch
+++ /dev/null
@@ -1,403 +0,0 @@
-From fab561f8d05794329184cd81f9ab9d9d77dcc22a Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 18:12:22 +0000
-Subject: [PATCH 01/29] gobject: Drop use of volatile from get_type() macros
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-http://isvolatileusefulwiththreads.in/c/
-
-It’s possible that the variables here are only marked as volatile
-because they’re arguments to `g_once_*()`. Those arguments will be
-modified in a subsequent commit.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- docs/reference/gobject/glib-mkenums.xml | 8 ++---
- docs/reference/gobject/tut_gtype.xml | 2 +-
- gio/gioenumtypes.c.template | 8 ++---
- gio/tests/gsettings.c | 4 +--
- gobject/gbinding.c | 8 ++---
- gobject/gboxed.c | 8 ++---
- gobject/glib-enumtypes.c.template | 8 ++---
- gobject/gsourceclosure.c | 2 +-
- gobject/gtype.h | 48 ++++++++++++-------------
- gobject/tests/signals.c | 16 ++++-----
- 10 files changed, 56 insertions(+), 56 deletions(-)
-
-diff --git a/docs/reference/gobject/glib-mkenums.xml b/docs/reference/gobject/glib-mkenums.xml
-index 2200328ed..ce250a3ff 100644
---- a/docs/reference/gobject/glib-mkenums.xml
-+++ b/docs/reference/gobject/glib-mkenums.xml
-@@ -480,9 +480,9 @@ A C source template file will typically look like this:
- GType
- @enum_name@_get_type (void)
- {
-- static volatile gsize g_@type@_type_id__volatile;
-+ static gsize static_g_@type@_type_id;
-
-- if (g_once_init_enter (&amp;g_define_type_id__volatile))
-+ if (g_once_init_enter (&amp;static_g_@type@_type_id))
- {
- static const G@Type@Value values[] = {
- /*** END value-header ***/
-@@ -498,9 +498,9 @@ GType
- GType g_@type@_type_id =
- g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
-
-- g_once_init_leave (&amp;g_@type@_type_id__volatile, g_@type@_type_id);
-+ g_once_init_leave (&amp;static_g_@type@_type_id, g_@type@_type_id);
- }
-- return g_@type@_type_id__volatile;
-+ return static_g_@type@_type_id;
- }
-
- /*** END value-tail ***/
-diff --git a/docs/reference/gobject/tut_gtype.xml b/docs/reference/gobject/tut_gtype.xml
-index 25e37dc48..ee042889d 100644
---- a/docs/reference/gobject/tut_gtype.xml
-+++ b/docs/reference/gobject/tut_gtype.xml
-@@ -852,7 +852,7 @@ viewer_editable_default_init (ViewerEditableInterface *iface)
- GType
- viewer_editable_get_type (void)
- {
-- static volatile gsize type_id = 0;
-+ static gsize type_id = 0;
- if (g_once_init_enter (&amp;type_id)) {
- const GTypeInfo info = {
- sizeof (ViewerEditableInterface),
-diff --git a/gio/gioenumtypes.c.template b/gio/gioenumtypes.c.template
-index e9adc4a38..948a01201 100644
---- a/gio/gioenumtypes.c.template
-+++ b/gio/gioenumtypes.c.template
-@@ -13,9 +13,9 @@
- GType
- @enum_name@_get_type (void)
- {
-- static volatile gsize g_define_type_id__volatile = 0;
-+ static gsize static_g_define_type_id = 0;
-
-- if (g_once_init_enter (&g_define_type_id__volatile))
-+ if (g_once_init_enter (&static_g_define_type_id))
- {
- static const G@Type@Value values[] = {
- /*** END value-header ***/
-@@ -29,10 +29,10 @@ GType
- };
- GType g_define_type_id =
- g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
-- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
-+ g_once_init_leave (&static_g_define_type_id, g_define_type_id);
- }
-
-- return g_define_type_id__volatile;
-+ return static_g_define_type_id;
- }
-
- /*** END value-tail ***/
-diff --git a/gio/tests/gsettings.c b/gio/tests/gsettings.c
-index 2f81ae6c3..179d0fd2f 100644
---- a/gio/tests/gsettings.c
-+++ b/gio/tests/gsettings.c
-@@ -1060,7 +1060,7 @@ test_object_set_property (GObject *object,
- static GType
- test_enum_get_type (void)
- {
-- static volatile gsize define_type_id = 0;
-+ static gsize define_type_id = 0;
-
- if (g_once_init_enter (&define_type_id))
- {
-@@ -1082,7 +1082,7 @@ test_enum_get_type (void)
- static GType
- test_flags_get_type (void)
- {
-- static volatile gsize define_type_id = 0;
-+ static gsize define_type_id = 0;
-
- if (g_once_init_enter (&define_type_id))
- {
-diff --git a/gobject/gbinding.c b/gobject/gbinding.c
-index 78a883075..662d76b3c 100644
---- a/gobject/gbinding.c
-+++ b/gobject/gbinding.c
-@@ -120,9 +120,9 @@
- GType
- g_binding_flags_get_type (void)
- {
-- static volatile gsize g_define_type_id__volatile = 0;
-+ static gsize static_g_define_type_id = 0;
-
-- if (g_once_init_enter (&g_define_type_id__volatile))
-+ if (g_once_init_enter (&static_g_define_type_id))
- {
- static const GFlagsValue values[] = {
- { G_BINDING_DEFAULT, "G_BINDING_DEFAULT", "default" },
-@@ -133,10 +133,10 @@ g_binding_flags_get_type (void)
- };
- GType g_define_type_id =
- g_flags_register_static (g_intern_static_string ("GBindingFlags"), values);
-- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
-+ g_once_init_leave (&static_g_define_type_id, g_define_type_id);
- }
-
-- return g_define_type_id__volatile;
-+ return static_g_define_type_id;
- }
-
- #define G_BINDING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_BINDING, GBindingClass))
-diff --git a/gobject/gboxed.c b/gobject/gboxed.c
-index 30ba4e775..194251383 100644
---- a/gobject/gboxed.c
-+++ b/gobject/gboxed.c
-@@ -180,19 +180,19 @@ G_DEFINE_BOXED_TYPE (GOptionGroup, g_option_group, g_option_group_ref, g_option_
- GType
- g_strv_get_type (void)
- {
-- static volatile gsize g_define_type_id__volatile = 0;
-+ static gsize static_g_define_type_id = 0;
-
-- if (g_once_init_enter (&g_define_type_id__volatile))
-+ if (g_once_init_enter (&static_g_define_type_id))
- {
- GType g_define_type_id =
- g_boxed_type_register_static (g_intern_static_string ("GStrv"),
- (GBoxedCopyFunc) g_strdupv,
- (GBoxedFreeFunc) g_strfreev);
-
-- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
-+ g_once_init_leave (&static_g_define_type_id, g_define_type_id);
- }
-
-- return g_define_type_id__volatile;
-+ return static_g_define_type_id;
- }
-
- GType
-diff --git a/gobject/glib-enumtypes.c.template b/gobject/glib-enumtypes.c.template
-index b7d36728f..1800ca8af 100644
---- a/gobject/glib-enumtypes.c.template
-+++ b/gobject/glib-enumtypes.c.template
-@@ -13,9 +13,9 @@
- GType
- @enum_name@_get_type (void)
- {
-- static volatile gsize g_define_type_id__volatile = 0;
-+ static gsize static_g_define_type_id = 0;
-
-- if (g_once_init_enter (&g_define_type_id__volatile))
-+ if (g_once_init_enter (&static_g_define_type_id))
- {
- static const G@Type@Value values[] = {
- /*** END value-header ***/
-@@ -29,10 +29,10 @@ GType
- };
- GType g_define_type_id =
- g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
-- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
-+ g_once_init_leave (&static_g_define_type_id, g_define_type_id);
- }
-
-- return g_define_type_id__volatile;
-+ return static_g_define_type_id;
- }
-
- /*** END value-tail ***/
-diff --git a/gobject/gsourceclosure.c b/gobject/gsourceclosure.c
-index 0d0d2e87c..d1b1ee4b3 100644
---- a/gobject/gsourceclosure.c
-+++ b/gobject/gsourceclosure.c
-@@ -32,7 +32,7 @@ G_DEFINE_BOXED_TYPE (GIOChannel, g_io_channel, g_io_channel_ref, g_io_channel_un
- GType
- g_io_condition_get_type (void)
- {
-- static volatile GType etype = 0;
-+ static GType etype = 0;
-
- if (g_once_init_enter (&etype))
- {
-diff --git a/gobject/gtype.h b/gobject/gtype.h
-index 9de46ac60..666fadb0c 100644
---- a/gobject/gtype.h
-+++ b/gobject/gtype.h
-@@ -1727,8 +1727,8 @@ guint g_type_get_type_registration_serial (void);
- * GType
- * gtk_gadget_get_type (void)
- * {
-- * static volatile gsize g_define_type_id__volatile = 0;
-- * if (g_once_init_enter (&g_define_type_id__volatile))
-+ * static gsize static_g_define_type_id = 0;
-+ * if (g_once_init_enter (&static_g_define_type_id))
- * {
- * GType g_define_type_id =
- * g_type_register_static_simple (GTK_TYPE_WIDGET,
-@@ -1748,9 +1748,9 @@ guint g_type_get_type_registration_serial (void);
- * };
- * g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
- * }
-- * g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
-+ * g_once_init_leave (&static_g_define_type_id, g_define_type_id);
- * }
-- * return g_define_type_id__volatile;
-+ * return static_g_define_type_id;
- * }
- * ]|
- * The only pieces which have to be manually provided are the definitions of
-@@ -1995,17 +1995,17 @@ type_name##_get_instance_private (TypeName *self) \
- GType \
- type_name##_get_type (void) \
- { \
-- static volatile gsize g_define_type_id__volatile = 0;
-+ static gsize static_g_define_type_id = 0;
- /* Prelude goes here */
-
- /* Added for _G_DEFINE_TYPE_EXTENDED_WITH_PRELUDE */
- #define _G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER(TypeName, type_name, TYPE_PARENT, flags) \
-- if (g_once_init_enter (&g_define_type_id__volatile)) \
-+ if (g_once_init_enter (&static_g_define_type_id)) \
- { \
- GType g_define_type_id = type_name##_get_type_once (); \
-- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \
-+ g_once_init_leave (&static_g_define_type_id, g_define_type_id); \
- } \
-- return g_define_type_id__volatile; \
-+ return static_g_define_type_id; \
- } /* closes type_name##_get_type() */ \
- \
- G_GNUC_NO_INLINE \
-@@ -2041,8 +2041,8 @@ static void type_name##_default_init (TypeName##Interface *klass); \
- GType \
- type_name##_get_type (void) \
- { \
-- static volatile gsize g_define_type_id__volatile = 0; \
-- if (g_once_init_enter (&g_define_type_id__volatile)) \
-+ static gsize static_g_define_type_id = 0; \
-+ if (g_once_init_enter (&static_g_define_type_id)) \
- { \
- GType g_define_type_id = \
- g_type_register_static_simple (G_TYPE_INTERFACE, \
-@@ -2058,9 +2058,9 @@ type_name##_get_type (void) \
- #define _G_DEFINE_INTERFACE_EXTENDED_END() \
- /* following custom code */ \
- } \
-- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \
-+ g_once_init_leave (&static_g_define_type_id, g_define_type_id); \
- } \
-- return g_define_type_id__volatile; \
-+ return static_g_define_type_id; \
- } /* closes type_name##_get_type() */
-
- /**
-@@ -2115,13 +2115,13 @@ static GType type_name##_get_type_once (void); \
- GType \
- type_name##_get_type (void) \
- { \
-- static volatile gsize g_define_type_id__volatile = 0; \
-- if (g_once_init_enter (&g_define_type_id__volatile)) \
-+ static gsize static_g_define_type_id = 0; \
-+ if (g_once_init_enter (&static_g_define_type_id)) \
- { \
- GType g_define_type_id = type_name##_get_type_once (); \
-- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \
-+ g_once_init_leave (&static_g_define_type_id, g_define_type_id); \
- } \
-- return g_define_type_id__volatile; \
-+ return static_g_define_type_id; \
- } \
- \
- G_GNUC_NO_INLINE \
-@@ -2152,13 +2152,13 @@ static GType type_name##_get_type_once (void); \
- GType \
- type_name##_get_type (void) \
- { \
-- static volatile gsize g_define_type_id__volatile = 0; \
-- if (g_once_init_enter (&g_define_type_id__volatile)) \
-+ static gsize static_g_define_type_id = 0; \
-+ if (g_once_init_enter (&static_g_define_type_id)) \
- { \
- GType g_define_type_id = type_name##_get_type_once (); \
-- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \
-+ g_once_init_leave (&static_g_define_type_id, g_define_type_id); \
- } \
-- return g_define_type_id__volatile; \
-+ return static_g_define_type_id; \
- } \
- \
- G_GNUC_NO_INLINE \
-@@ -2205,13 +2205,13 @@ static GType type_name##_get_type_once (void); \
- GType \
- type_name##_get_type (void) \
- { \
-- static volatile gsize g_define_type_id__volatile = 0; \
-- if (g_once_init_enter (&g_define_type_id__volatile)) \
-+ static gsize static_g_define_type_id = 0; \
-+ if (g_once_init_enter (&static_g_define_type_id)) \
- { \
- GType g_define_type_id = type_name##_get_type_once (); \
-- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \
-+ g_once_init_leave (&static_g_define_type_id, g_define_type_id); \
- } \
-- return g_define_type_id__volatile; \
-+ return static_g_define_type_id; \
- } \
- \
- G_GNUC_NO_INLINE \
-diff --git a/gobject/tests/signals.c b/gobject/tests/signals.c
-index 120f90b5c..ac0ce5102 100644
---- a/gobject/tests/signals.c
-+++ b/gobject/tests/signals.c
-@@ -66,9 +66,9 @@ custom_marshal_VOID__INVOCATIONHINT (GClosure *closure,
- static GType
- test_enum_get_type (void)
- {
-- static volatile gsize g_define_type_id__volatile = 0;
-+ static gsize static_g_define_type_id = 0;
-
-- if (g_once_init_enter (&g_define_type_id__volatile))
-+ if (g_once_init_enter (&static_g_define_type_id))
- {
- static const GEnumValue values[] = {
- { TEST_ENUM_NEGATIVE, "TEST_ENUM_NEGATIVE", "negative" },
-@@ -79,18 +79,18 @@ test_enum_get_type (void)
- };
- GType g_define_type_id =
- g_enum_register_static (g_intern_static_string ("TestEnum"), values);
-- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
-+ g_once_init_leave (&static_g_define_type_id, g_define_type_id);
- }
-
-- return g_define_type_id__volatile;
-+ return static_g_define_type_id;
- }
-
- static GType
- test_unsigned_enum_get_type (void)
- {
-- static volatile gsize g_define_type_id__volatile = 0;
-+ static gsize static_g_define_type_id = 0;
-
-- if (g_once_init_enter (&g_define_type_id__volatile))
-+ if (g_once_init_enter (&static_g_define_type_id))
- {
- static const GEnumValue values[] = {
- { TEST_UNSIGNED_ENUM_FOO, "TEST_UNSIGNED_ENUM_FOO", "foo" },
-@@ -99,10 +99,10 @@ test_unsigned_enum_get_type (void)
- };
- GType g_define_type_id =
- g_enum_register_static (g_intern_static_string ("TestUnsignedEnum"), values);
-- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
-+ g_once_init_leave (&static_g_define_type_id, g_define_type_id);
- }
-
-- return g_define_type_id__volatile;
-+ return static_g_define_type_id;
- }
-
- typedef enum {
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch
index 44482dd2b7..0b10269114 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch
@@ -1,4 +1,4 @@
-From 4b97f457b7b44117e27d2a218c4b68e7fe3fe4ce Mon Sep 17 00:00:00 2001
+From b4b523160ef550a53705fcc45ac6e10d086ce491 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 12 Oct 2019 17:46:26 -0700
Subject: [PATCH] meson: Run atomics test on clang as well
@@ -9,16 +9,15 @@ Fixes
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
-index afb6eaa..6aa70f5 100644
+index 6ee775e..8bc5fa7 100644
--- a/meson.build
+++ b/meson.build
-@@ -1692,7 +1692,7 @@ atomicdefine = '''
+@@ -1938,7 +1938,7 @@ atomicdefine = '''
# We know that we can always use real ("lock free") atomic operations with MSVC
if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' or cc.links(atomictest, name : 'atomic ops')
have_atomic_lock_free = true
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch
new file mode 100644
index 0000000000..14dcb278e0
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch
@@ -0,0 +1,29 @@
+From 294f3e6e9a0a9f4733e85ed6810d1b743055370b Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Sat, 16 Sep 2023 22:28:27 +0200
+Subject: [PATCH] meson.build: do not enable pidfd features on native glib
+ builds
+
+We still use host distros like alma 8 with kernels older than 5.4,
+where these features are not implemented.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ meson.build | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 8bc5fa7..df1fa60 100644
+--- a/meson.build
++++ b/meson.build
+@@ -981,7 +981,8 @@ if cc.links('''#include <sys/syscall.h>
+ waitid (P_PIDFD, 0, &child_info, WEXITED | WNOHANG);
+ return 0;
+ }''', name : 'pidfd_open(2) system call')
+- glib_conf.set('HAVE_PIDFD', 1)
++ #requires kernel 5.4+
++ #glib_conf.set('HAVE_PIDFD', 1)
+ endif
+
+ # Check for __uint128_t (gcc) by checking for 128-bit division
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-tests-codegen.py-removing-unecessary-print-statement.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-tests-codegen.py-removing-unecessary-print-statement.patch
deleted file mode 100644
index 40427e0e67..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-tests-codegen.py-removing-unecessary-print-statement.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 6178df5658045a6253ef806e018fe80d99a8f5fb Mon Sep 17 00:00:00 2001
-From: Yi Fan Yu <yifan.yu@windriver.com>
-Date: Mon, 1 Feb 2021 16:10:28 -0500
-Subject: [PATCH] tests/codegen.py: removing unecessary print statement
-
-A huge amount of output(boiler-plate code) is
-printed to the console screen.
-This is not critical to the test results.
-
-This causes intermittent test failure when another process
-has to parse its output.
-
-Root cause is in ptest-runner, This is a workaround
-
-Uptream-Status: Inappropriate [other]
-
-
-
-Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
----
- gio/tests/codegen.py | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/gio/tests/codegen.py b/gio/tests/codegen.py
-index 51de0ede4..cfa4db42e 100644
---- a/gio/tests/codegen.py
-+++ b/gio/tests/codegen.py
-@@ -250,7 +250,6 @@ class TestCodegen(unittest.TestCase):
-
- result = Result(info, out, err, subs)
-
-- print('Output:', result.out)
- return result
-
- def runCodegenWithInterface(self, interface_contents, *args):
---
-2.29.2
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Fix-non-atomic-access-to-a-shared-variable.patch b/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Fix-non-atomic-access-to-a-shared-variable.patch
deleted file mode 100644
index fada7cc38e..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Fix-non-atomic-access-to-a-shared-variable.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From a6ce0e742a5c75c53a7c702ebb1af1084065160a Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 18:14:29 +0000
-Subject: [PATCH 02/29] tests: Fix non-atomic access to a shared variable
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-And drop the `volatile` qualifier from the variable, as that doesn’t
-help with thread safety.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- glib/tests/642026.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/glib/tests/642026.c b/glib/tests/642026.c
-index ef54f14bb..26ab2ed06 100644
---- a/glib/tests/642026.c
-+++ b/glib/tests/642026.c
-@@ -25,7 +25,7 @@ static GMutex *mutex;
- static GCond *cond;
- static guint i;
-
--static volatile gint freed = 0;
-+static gint freed = 0; /* (atomic) */
-
- static void
- notify (gpointer p)
-@@ -63,7 +63,7 @@ testcase (void)
- GThread *t1;
-
- g_static_private_init (&sp);
-- freed = 0;
-+ g_atomic_int_set (&freed, 0);
-
- t1 = g_thread_create (thread_func, NULL, TRUE, NULL);
- g_assert (t1 != NULL);
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0003-tests-Fix-non-atomic-access-to-a-shared-variable.patch b/meta/recipes-core/glib-2.0/glib-2.0/0003-tests-Fix-non-atomic-access-to-a-shared-variable.patch
deleted file mode 100644
index 8bc71a698d..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0003-tests-Fix-non-atomic-access-to-a-shared-variable.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From ea746c79faf554d980c21b0e4381753e003d2dc6 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 18:17:23 +0000
-Subject: [PATCH 03/29] tests: Fix non-atomic access to a shared variable
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-And drop the `volatile` qualifier from the variable, as that doesn’t
-help with thread safety.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- glib/tests/mainloop.c | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/glib/tests/mainloop.c b/glib/tests/mainloop.c
-index 16763a0ea..563a951de 100644
---- a/glib/tests/mainloop.c
-+++ b/glib/tests/mainloop.c
-@@ -918,7 +918,7 @@ test_mainloop_overflow (void)
- g_main_context_unref (ctx);
- }
-
--static volatile gint ready_time_dispatched;
-+static gint ready_time_dispatched; /* (atomic) */
-
- static gboolean
- ready_time_dispatch (GSource *source,
-@@ -964,7 +964,7 @@ test_ready_time (void)
- /* A source with no ready time set should not fire */
- g_assert_cmpint (g_source_get_ready_time (source), ==, -1);
- while (g_main_context_iteration (NULL, FALSE));
-- g_assert_false (ready_time_dispatched);
-+ g_assert_false (g_atomic_int_get (&ready_time_dispatched));
-
- /* The ready time should not have been changed */
- g_assert_cmpint (g_source_get_ready_time (source), ==, -1);
-@@ -978,37 +978,37 @@ test_ready_time (void)
- */
- g_source_set_ready_time (source, g_get_monotonic_time () + G_TIME_SPAN_DAY);
- while (g_main_context_iteration (NULL, FALSE));
-- g_assert_false (ready_time_dispatched);
-+ g_assert_false (g_atomic_int_get (&ready_time_dispatched));
- /* Make sure it didn't get reset */
- g_assert_cmpint (g_source_get_ready_time (source), !=, -1);
-
- /* Ready time of -1 -> don't fire */
- g_source_set_ready_time (source, -1);
- while (g_main_context_iteration (NULL, FALSE));
-- g_assert_false (ready_time_dispatched);
-+ g_assert_false (g_atomic_int_get (&ready_time_dispatched));
- /* Not reset, but should still be -1 from above */
- g_assert_cmpint (g_source_get_ready_time (source), ==, -1);
-
- /* A ready time of the current time should fire immediately */
- g_source_set_ready_time (source, g_get_monotonic_time ());
- while (g_main_context_iteration (NULL, FALSE));
-- g_assert_true (ready_time_dispatched);
-- ready_time_dispatched = FALSE;
-+ g_assert_true (g_atomic_int_get (&ready_time_dispatched));
-+ g_atomic_int_set (&ready_time_dispatched, FALSE);
- /* Should have gotten reset by the handler function */
- g_assert_cmpint (g_source_get_ready_time (source), ==, -1);
-
- /* As well as one in the recent past... */
- g_source_set_ready_time (source, g_get_monotonic_time () - G_TIME_SPAN_SECOND);
- while (g_main_context_iteration (NULL, FALSE));
-- g_assert_true (ready_time_dispatched);
-- ready_time_dispatched = FALSE;
-+ g_assert_true (g_atomic_int_get (&ready_time_dispatched));
-+ g_atomic_int_set (&ready_time_dispatched, FALSE);
- g_assert_cmpint (g_source_get_ready_time (source), ==, -1);
-
- /* Zero is the 'official' way to get a source to fire immediately */
- g_source_set_ready_time (source, 0);
- while (g_main_context_iteration (NULL, FALSE));
-- g_assert_true (ready_time_dispatched);
-- ready_time_dispatched = FALSE;
-+ g_assert_true (g_atomic_int_get (&ready_time_dispatched));
-+ g_atomic_int_set (&ready_time_dispatched, FALSE);
- g_assert_cmpint (g_source_get_ready_time (source), ==, -1);
-
- /* Now do some tests of cross-thread wakeups.
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0004-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch b/meta/recipes-core/glib-2.0/glib-2.0/0004-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch
deleted file mode 100644
index 4b7b6f463a..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0004-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From 3dda662bebb81666d009635df1055ba5c1e17b52 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 18:16:17 +0000
-Subject: [PATCH 04/29] tests: Drop unnecessary volatile qualifiers from tests
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-These variables were already (correctly) accessed atomically. The
-`volatile` qualifier doesn’t help with that.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- glib/tests/atomic.c | 4 ++--
- glib/tests/cond.c | 2 +-
- glib/tests/gwakeuptest.c | 2 +-
- glib/tests/hash.c | 2 +-
- glib/tests/slice.c | 2 +-
- 5 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/glib/tests/atomic.c b/glib/tests/atomic.c
-index 6b6cc7f3e..7d2459f3a 100644
---- a/glib/tests/atomic.c
-+++ b/glib/tests/atomic.c
-@@ -248,8 +248,8 @@ G_GNUC_END_IGNORE_DEPRECATIONS
- #define THREADS 10
- #define ROUNDS 10000
-
--volatile gint bucket[THREADS];
--volatile gint atomic;
-+gint bucket[THREADS]; /* never contested by threads, not accessed atomically */
-+gint atomic; /* (atomic) */
-
- static gpointer
- thread_func (gpointer data)
-diff --git a/glib/tests/cond.c b/glib/tests/cond.c
-index 0f0b3d249..ed338cce3 100644
---- a/glib/tests/cond.c
-+++ b/glib/tests/cond.c
-@@ -29,7 +29,7 @@
-
- static GCond cond;
- static GMutex mutex;
--static volatile gint next;
-+static gint next; /* locked by @mutex */
-
- static void
- push_value (gint value)
-diff --git a/glib/tests/gwakeuptest.c b/glib/tests/gwakeuptest.c
-index 461a7d3de..b37fb43fc 100644
---- a/glib/tests/gwakeuptest.c
-+++ b/glib/tests/gwakeuptest.c
-@@ -92,7 +92,7 @@ struct context
- static struct context contexts[NUM_THREADS];
- static GThread *threads[NUM_THREADS];
- static GWakeup *last_token_wakeup;
--static volatile gint tokens_alive;
-+static gint tokens_alive; /* (atomic) */
-
- static void
- context_init (struct context *ctx)
-diff --git a/glib/tests/hash.c b/glib/tests/hash.c
-index 4623d18d1..f4ff55ce1 100644
---- a/glib/tests/hash.c
-+++ b/glib/tests/hash.c
-@@ -1362,7 +1362,7 @@ struct _GHashTable
-
- GHashFunc hash_func;
- GEqualFunc key_equal_func;
-- volatile gint ref_count;
-+ gint ref_count; /* (atomic) */
-
- #ifndef G_DISABLE_ASSERT
- int version;
-diff --git a/glib/tests/slice.c b/glib/tests/slice.c
-index f37826f3a..a566280db 100644
---- a/glib/tests/slice.c
-+++ b/glib/tests/slice.c
-@@ -107,7 +107,7 @@ thread_allocate (gpointer data)
- gint b;
- gint size;
- gpointer p;
-- volatile gpointer *loc;
-+ gpointer *loc; /* (atomic) */
-
- for (i = 0; i < 10000; i++)
- {
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0005-tests-Fix-non-atomic-access-to-some-shared-variables.patch b/meta/recipes-core/glib-2.0/glib-2.0/0005-tests-Fix-non-atomic-access-to-some-shared-variables.patch
deleted file mode 100644
index 3aecf4582b..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0005-tests-Fix-non-atomic-access-to-some-shared-variables.patch
+++ /dev/null
@@ -1,702 +0,0 @@
-From 7f905ff1faf0acbe0d2ce69937e031fcacce9294 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 18:21:00 +0000
-Subject: [PATCH 05/29] tests: Fix non-atomic access to some shared variables
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-And drop the `volatile` qualifier from the variables, as that doesn’t
-help with thread safety.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- gio/tests/gdbus-connection-flush.c | 6 +-
- gio/tests/gdbus-connection.c | 40 ++++----
- gio/tests/gdbus-overflow.c | 20 ++--
- gio/tests/socket-service.c | 6 +-
- gio/tests/task.c | 150 ++++++++++++++---------------
- 5 files changed, 111 insertions(+), 111 deletions(-)
-
---- a/gio/tests/gdbus-connection-flush.c
-+++ b/gio/tests/gdbus-connection-flush.c
-@@ -43,9 +43,9 @@ G_LOCK_DEFINE_STATIC (write);
- typedef struct {
- GFilterOutputStream parent;
-
-- volatile gint started;
-- volatile gint finished;
-- volatile gint flushed;
-+ gint started; /* (atomic) */
-+ gint finished; /* (atomic) */
-+ gint flushed; /* (atomic) */
-
- GOutputStream *real_output;
- } MyOutputStream;
---- a/gio/tests/gdbus-connection.c
-+++ b/gio/tests/gdbus-connection.c
-@@ -61,9 +61,9 @@ _log (const gchar *format, ...)
- static gboolean
- test_connection_quit_mainloop (gpointer user_data)
- {
-- volatile gboolean *quit_mainloop_fired = user_data;
-+ gboolean *quit_mainloop_fired = user_data; /* (atomic) */
- _log ("quit_mainloop_fired");
-- *quit_mainloop_fired = TRUE;
-+ g_atomic_int_set (quit_mainloop_fired, TRUE);
- g_main_loop_quit (loop);
- return TRUE;
- }
-@@ -113,8 +113,8 @@ on_name_owner_changed (GDBusConnection *
- static void
- a_gdestroynotify_that_sets_a_gboolean_to_true_and_quits_loop (gpointer user_data)
- {
-- volatile gboolean *val = user_data;
-- *val = TRUE;
-+ gboolean *val = user_data; /* (atomic) */
-+ g_atomic_int_set (val, TRUE);
- _log ("destroynotify fired for %p", val);
- g_main_loop_quit (loop);
- }
-@@ -143,10 +143,10 @@ test_connection_life_cycle (void)
- GDBusConnection *c;
- GDBusConnection *c2;
- GError *error;
-- volatile gboolean on_signal_registration_freed_called;
-- volatile gboolean on_filter_freed_called;
-- volatile gboolean on_register_object_freed_called;
-- volatile gboolean quit_mainloop_fired;
-+ gboolean on_signal_registration_freed_called; /* (atomic) */
-+ gboolean on_filter_freed_called; /* (atomic) */
-+ gboolean on_register_object_freed_called; /* (atomic) */
-+ gboolean quit_mainloop_fired; /* (atomic) */
- guint quit_mainloop_id;
- guint registration_id;
-
-@@ -208,7 +208,7 @@ test_connection_life_cycle (void)
- g_assert_no_error (error);
- g_assert_nonnull (c2);
- /* signal registration */
-- on_signal_registration_freed_called = FALSE;
-+ g_atomic_int_set (&on_signal_registration_freed_called, FALSE);
- g_dbus_connection_signal_subscribe (c2,
- "org.freedesktop.DBus", /* bus name */
- "org.freedesktop.DBus", /* interface */
-@@ -220,13 +220,13 @@ test_connection_life_cycle (void)
- (gpointer) &on_signal_registration_freed_called,
- a_gdestroynotify_that_sets_a_gboolean_to_true_and_quits_loop);
- /* filter func */
-- on_filter_freed_called = FALSE;
-+ g_atomic_int_set (&on_filter_freed_called, FALSE);
- g_dbus_connection_add_filter (c2,
- some_filter_func,
- (gpointer) &on_filter_freed_called,
- a_gdestroynotify_that_sets_a_gboolean_to_true_and_quits_loop);
- /* object registration */
-- on_register_object_freed_called = FALSE;
-+ g_atomic_int_set (&on_register_object_freed_called, FALSE);
- error = NULL;
- registration_id = g_dbus_connection_register_object (c2,
- "/foo",
-@@ -239,7 +239,7 @@ test_connection_life_cycle (void)
- g_assert_cmpuint (registration_id, >, 0);
- /* ok, finalize the connection and check that all the GDestroyNotify functions are invoked as expected */
- g_object_unref (c2);
-- quit_mainloop_fired = FALSE;
-+ g_atomic_int_set (&quit_mainloop_fired, FALSE);
- quit_mainloop_id = g_timeout_add (30000, test_connection_quit_mainloop, (gpointer) &quit_mainloop_fired);
- _log ("destroynotifies for\n"
- " register_object %p\n"
-@@ -250,21 +250,21 @@ test_connection_life_cycle (void)
- &on_signal_registration_freed_called);
- while (TRUE)
- {
-- if (on_signal_registration_freed_called &&
-- on_filter_freed_called &&
-- on_register_object_freed_called)
-+ if (g_atomic_int_get (&on_signal_registration_freed_called) &&
-+ g_atomic_int_get (&on_filter_freed_called) &&
-+ g_atomic_int_get (&on_register_object_freed_called))
- break;
-- if (quit_mainloop_fired)
-+ if (g_atomic_int_get (&quit_mainloop_fired))
- break;
- _log ("entering loop");
- g_main_loop_run (loop);
- _log ("exiting loop");
- }
- g_source_remove (quit_mainloop_id);
-- g_assert_true (on_signal_registration_freed_called);
-- g_assert_true (on_filter_freed_called);
-- g_assert_true (on_register_object_freed_called);
-- g_assert_false (quit_mainloop_fired);
-+ g_assert_true (g_atomic_int_get (&on_signal_registration_freed_called));
-+ g_assert_true (g_atomic_int_get (&on_filter_freed_called));
-+ g_assert_true (g_atomic_int_get (&on_register_object_freed_called));
-+ g_assert_false (g_atomic_int_get (&quit_mainloop_fired));
-
- /*
- * Check for correct behavior when the bus goes away
---- a/gio/tests/gdbus-overflow.c
-+++ b/gio/tests/gdbus-overflow.c
-@@ -86,8 +86,8 @@ overflow_filter_func (GDBusConnection *c
- gboolean incoming,
- gpointer user_data)
- {
-- volatile gint *counter = user_data;
-- *counter += 1;
-+ gint *counter = user_data; /* (atomic) */
-+ g_atomic_int_inc (counter);
- return message;
- }
-
-@@ -108,8 +108,8 @@ test_overflow (void)
- GDBusConnection *producer, *consumer;
- GError *error;
- GTimer *timer;
-- volatile gint n_messages_received;
-- volatile gint n_messages_sent;
-+ gint n_messages_received; /* (atomic) */
-+ gint n_messages_sent; /* (atomic) */
-
- g_assert_cmpint (socketpair (AF_UNIX, SOCK_STREAM, 0, sv), ==, 0);
-
-@@ -129,7 +129,7 @@ test_overflow (void)
- g_dbus_connection_set_exit_on_close (producer, TRUE);
- g_assert_no_error (error);
- g_object_unref (socket_connection);
-- n_messages_sent = 0;
-+ g_atomic_int_set (&n_messages_sent, 0);
- g_dbus_connection_add_filter (producer, overflow_filter_func, (gpointer) &n_messages_sent, NULL);
-
- /* send enough data that we get an EAGAIN */
-@@ -155,7 +155,7 @@ test_overflow (void)
- */
- g_timeout_add (500, overflow_on_500ms_later_func, NULL);
- g_main_loop_run (loop);
-- g_assert_cmpint (n_messages_sent, <, OVERFLOW_NUM_SIGNALS);
-+ g_assert_cmpint (g_atomic_int_get (&n_messages_sent), <, OVERFLOW_NUM_SIGNALS);
-
- /* now suck it all out as a client, and add it up */
- socket = g_socket_new_from_fd (sv[1], &error);
-@@ -171,18 +171,18 @@ test_overflow (void)
- &error);
- g_assert_no_error (error);
- g_object_unref (socket_connection);
-- n_messages_received = 0;
-+ g_atomic_int_set (&n_messages_received, 0);
- g_dbus_connection_add_filter (consumer, overflow_filter_func, (gpointer) &n_messages_received, NULL);
- g_dbus_connection_start_message_processing (consumer);
-
- timer = g_timer_new ();
- g_timer_start (timer);
-
-- while (n_messages_received < OVERFLOW_NUM_SIGNALS && g_timer_elapsed (timer, NULL) < OVERFLOW_TIMEOUT_SEC)
-+ while (g_atomic_int_get (&n_messages_received) < OVERFLOW_NUM_SIGNALS && g_timer_elapsed (timer, NULL) < OVERFLOW_TIMEOUT_SEC)
- g_main_context_iteration (NULL, FALSE);
-
-- g_assert_cmpint (n_messages_sent, ==, OVERFLOW_NUM_SIGNALS);
-- g_assert_cmpint (n_messages_received, ==, OVERFLOW_NUM_SIGNALS);
-+ g_assert_cmpint (g_atomic_int_get (&n_messages_sent), ==, OVERFLOW_NUM_SIGNALS);
-+ g_assert_cmpint (g_atomic_int_get (&n_messages_received), ==, OVERFLOW_NUM_SIGNALS);
-
- g_timer_destroy (timer);
- g_object_unref (consumer);
---- a/gio/tests/socket-service.c
-+++ b/gio/tests/socket-service.c
-@@ -99,7 +99,7 @@ test_start_stop (void)
-
- GMutex mutex_712570;
- GCond cond_712570;
--volatile gboolean finalized;
-+gboolean finalized; /* (atomic) */
-
- GType test_threaded_socket_service_get_type (void);
- typedef GThreadedSocketService TestThreadedSocketService;
-@@ -120,7 +120,7 @@ test_threaded_socket_service_finalize (G
- /* Signal the main thread that finalization completed successfully
- * rather than hanging.
- */
-- finalized = TRUE;
-+ g_atomic_int_set (&finalized, TRUE);
- g_cond_signal (&cond_712570);
- g_mutex_unlock (&mutex_712570);
- }
-@@ -235,7 +235,7 @@ test_threaded_712570 (void)
- */
- g_object_unref (service);
-
-- while (!finalized)
-+ while (!g_atomic_int_get (&finalized))
- g_cond_wait (&cond_712570, &mutex_712570);
- g_mutex_unlock (&mutex_712570);
- }
---- a/gio/tests/task.c
-+++ b/gio/tests/task.c
-@@ -957,7 +957,7 @@ task_weak_notify (gpointer user_data,
- gboolean *weak_notify_ran = user_data;
-
- g_mutex_lock (&run_in_thread_mutex);
-- *weak_notify_ran = TRUE;
-+ g_atomic_int_set (weak_notify_ran, TRUE);
- g_cond_signal (&run_in_thread_cond);
- g_mutex_unlock (&run_in_thread_mutex);
- }
-@@ -1007,7 +1007,7 @@ run_in_thread_thread (GTask *task
- g_assert (g_thread_self () != main_thread);
-
- g_mutex_lock (&run_in_thread_mutex);
-- *thread_ran = TRUE;
-+ g_atomic_int_set (thread_ran, TRUE);
- g_cond_signal (&run_in_thread_cond);
- g_mutex_unlock (&run_in_thread_mutex);
-
-@@ -1018,8 +1018,8 @@ static void
- test_run_in_thread (void)
- {
- GTask *task;
-- volatile gboolean thread_ran = FALSE;
-- volatile gboolean weak_notify_ran = FALSE;
-+ gboolean thread_ran = FALSE; /* (atomic) */
-+ gboolean weak_notify_ran = FALSE; /* (atomic) */
- gboolean notification_emitted = FALSE;
- gboolean done = FALSE;
-
-@@ -1033,12 +1033,12 @@ test_run_in_thread (void)
- g_task_run_in_thread (task, run_in_thread_thread);
-
- g_mutex_lock (&run_in_thread_mutex);
-- while (!thread_ran)
-+ while (!g_atomic_int_get (&thread_ran))
- g_cond_wait (&run_in_thread_cond, &run_in_thread_mutex);
- g_mutex_unlock (&run_in_thread_mutex);
-
- g_assert (done == FALSE);
-- g_assert (weak_notify_ran == FALSE);
-+ g_assert_false (g_atomic_int_get (&weak_notify_ran));
-
- g_main_loop_run (loop);
-
-@@ -1050,7 +1050,7 @@ test_run_in_thread (void)
- g_object_unref (task);
-
- g_mutex_lock (&run_in_thread_mutex);
-- while (!weak_notify_ran)
-+ while (!g_atomic_int_get (&weak_notify_ran))
- g_cond_wait (&run_in_thread_cond, &run_in_thread_mutex);
- g_mutex_unlock (&run_in_thread_mutex);
- }
-@@ -1081,7 +1081,7 @@ run_in_thread_sync_thread (GTask
-
- g_assert (g_thread_self () != main_thread);
-
-- *thread_ran = TRUE;
-+ g_atomic_int_set (thread_ran, TRUE);
- g_task_return_int (task, magic);
- }
-
-@@ -1102,7 +1102,7 @@ test_run_in_thread_sync (void)
- g_task_set_task_data (task, &thread_ran, NULL);
- g_task_run_in_thread_sync (task, run_in_thread_sync_thread);
-
-- g_assert (thread_ran == TRUE);
-+ g_assert_true (g_atomic_int_get (&thread_ran));
- g_assert (task != NULL);
- g_assert (!g_task_had_error (task));
- g_assert_true (g_task_get_completed (task));
-@@ -1487,8 +1487,8 @@ test_return_on_cancel (void)
- {
- GTask *task;
- GCancellable *cancellable;
-- volatile ThreadState thread_state;
-- volatile gboolean weak_notify_ran = FALSE;
-+ ThreadState thread_state; /* (atomic) */
-+ gboolean weak_notify_ran = FALSE; /* (atomic) */
- gboolean callback_ran;
- gboolean notification_emitted = FALSE;
-
-@@ -1498,7 +1498,7 @@ test_return_on_cancel (void)
- * early.
- */
- callback_ran = FALSE;
-- thread_state = THREAD_STARTING;
-+ g_atomic_int_set (&thread_state, THREAD_STARTING);
- task = g_task_new (NULL, cancellable, return_on_cancel_callback, &callback_ran);
- g_signal_connect (task, "notify::completed",
- (GCallback) completed_cb, &notification_emitted);
-@@ -1509,18 +1509,18 @@ test_return_on_cancel (void)
- g_task_run_in_thread (task, return_on_cancel_thread);
- g_object_unref (task);
-
-- while (thread_state == THREAD_STARTING)
-+ while (g_atomic_int_get (&thread_state) == THREAD_STARTING)
- g_cond_wait (&roc_init_cond, &roc_init_mutex);
- g_mutex_unlock (&roc_init_mutex);
-
-- g_assert (thread_state == THREAD_RUNNING);
-+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_RUNNING);
- g_assert (callback_ran == FALSE);
-
- g_cancellable_cancel (cancellable);
- g_mutex_unlock (&roc_finish_mutex);
- g_main_loop_run (loop);
-
-- g_assert (thread_state == THREAD_COMPLETED);
-+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_COMPLETED);
- g_assert (callback_ran == TRUE);
- g_assert_true (notification_emitted);
-
-@@ -1529,7 +1529,7 @@ test_return_on_cancel (void)
- /* If return-on-cancel is TRUE, it does return early */
- callback_ran = FALSE;
- notification_emitted = FALSE;
-- thread_state = THREAD_STARTING;
-+ g_atomic_int_set (&thread_state, THREAD_STARTING);
- task = g_task_new (NULL, cancellable, return_on_cancel_callback, &callback_ran);
- g_object_weak_ref (G_OBJECT (task), task_weak_notify, (gpointer)&weak_notify_ran);
- g_signal_connect (task, "notify::completed",
-@@ -1542,27 +1542,27 @@ test_return_on_cancel (void)
- g_task_run_in_thread (task, return_on_cancel_thread);
- g_object_unref (task);
-
-- while (thread_state == THREAD_STARTING)
-+ while (g_atomic_int_get (&thread_state) == THREAD_STARTING)
- g_cond_wait (&roc_init_cond, &roc_init_mutex);
- g_mutex_unlock (&roc_init_mutex);
-
-- g_assert (thread_state == THREAD_RUNNING);
-+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_RUNNING);
- g_assert (callback_ran == FALSE);
-
- g_cancellable_cancel (cancellable);
- g_main_loop_run (loop);
-- g_assert (thread_state == THREAD_RUNNING);
-+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_RUNNING);
- g_assert (callback_ran == TRUE);
-
-- g_assert (weak_notify_ran == FALSE);
-+ g_assert_false (g_atomic_int_get (&weak_notify_ran));
-
-- while (thread_state == THREAD_RUNNING)
-+ while (g_atomic_int_get (&thread_state) == THREAD_RUNNING)
- g_cond_wait (&roc_finish_cond, &roc_finish_mutex);
- g_mutex_unlock (&roc_finish_mutex);
-
-- g_assert (thread_state == THREAD_CANCELLED);
-+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_CANCELLED);
- g_mutex_lock (&run_in_thread_mutex);
-- while (!weak_notify_ran)
-+ while (!g_atomic_int_get (&weak_notify_ran))
- g_cond_wait (&run_in_thread_cond, &run_in_thread_mutex);
- g_mutex_unlock (&run_in_thread_mutex);
-
-@@ -1574,7 +1574,7 @@ test_return_on_cancel (void)
- */
- callback_ran = FALSE;
- notification_emitted = FALSE;
-- thread_state = THREAD_STARTING;
-+ g_atomic_int_set (&thread_state, THREAD_STARTING);
- task = g_task_new (NULL, cancellable, return_on_cancel_callback, &callback_ran);
- g_signal_connect (task, "notify::completed",
- (GCallback) completed_cb, &notification_emitted);
-@@ -1591,17 +1591,17 @@ test_return_on_cancel (void)
- g_main_loop_run (loop);
- g_assert (callback_ran == TRUE);
-
-- while (thread_state == THREAD_STARTING)
-+ while (g_atomic_int_get (&thread_state) == THREAD_STARTING)
- g_cond_wait (&roc_init_cond, &roc_init_mutex);
- g_mutex_unlock (&roc_init_mutex);
-
-- g_assert (thread_state == THREAD_RUNNING);
-+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_RUNNING);
-
-- while (thread_state == THREAD_RUNNING)
-+ while (g_atomic_int_get (&thread_state) == THREAD_RUNNING)
- g_cond_wait (&roc_finish_cond, &roc_finish_mutex);
- g_mutex_unlock (&roc_finish_mutex);
-
-- g_assert (thread_state == THREAD_CANCELLED);
-+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_CANCELLED);
- g_assert_true (notification_emitted);
-
- g_object_unref (cancellable);
-@@ -1621,7 +1621,7 @@ test_return_on_cancel_sync (void)
- {
- GTask *task;
- GCancellable *cancellable;
-- volatile ThreadState thread_state;
-+ ThreadState thread_state; /* (atomic) */
- GThread *runner_thread;
- gssize ret;
- GError *error = NULL;
-@@ -1630,7 +1630,7 @@ test_return_on_cancel_sync (void)
-
- /* If return-on-cancel is FALSE, the task does not return early.
- */
-- thread_state = THREAD_STARTING;
-+ g_atomic_int_set (&thread_state, THREAD_STARTING);
- task = g_task_new (NULL, cancellable, run_in_thread_sync_callback, NULL);
-
- g_task_set_task_data (task, (gpointer)&thread_state, NULL);
-@@ -1639,16 +1639,16 @@ test_return_on_cancel_sync (void)
- runner_thread = g_thread_new ("return-on-cancel-sync runner thread",
- cancel_sync_runner_thread, task);
-
-- while (thread_state == THREAD_STARTING)
-+ while (g_atomic_int_get (&thread_state) == THREAD_STARTING)
- g_cond_wait (&roc_init_cond, &roc_init_mutex);
- g_mutex_unlock (&roc_init_mutex);
-
-- g_assert (thread_state == THREAD_RUNNING);
-+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_RUNNING);
-
- g_cancellable_cancel (cancellable);
- g_mutex_unlock (&roc_finish_mutex);
- g_thread_join (runner_thread);
-- g_assert (thread_state == THREAD_COMPLETED);
-+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_COMPLETED);
-
- ret = g_task_propagate_int (task, &error);
- g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
-@@ -1660,7 +1660,7 @@ test_return_on_cancel_sync (void)
- g_cancellable_reset (cancellable);
-
- /* If return-on-cancel is TRUE, it does return early */
-- thread_state = THREAD_STARTING;
-+ g_atomic_int_set (&thread_state, THREAD_STARTING);
- task = g_task_new (NULL, cancellable, run_in_thread_sync_callback, NULL);
- g_task_set_return_on_cancel (task, TRUE);
-
-@@ -1670,15 +1670,15 @@ test_return_on_cancel_sync (void)
- runner_thread = g_thread_new ("return-on-cancel-sync runner thread",
- cancel_sync_runner_thread, task);
-
-- while (thread_state == THREAD_STARTING)
-+ while (g_atomic_int_get (&thread_state) == THREAD_STARTING)
- g_cond_wait (&roc_init_cond, &roc_init_mutex);
- g_mutex_unlock (&roc_init_mutex);
-
-- g_assert (thread_state == THREAD_RUNNING);
-+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_RUNNING);
-
- g_cancellable_cancel (cancellable);
- g_thread_join (runner_thread);
-- g_assert (thread_state == THREAD_RUNNING);
-+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_RUNNING);
-
- ret = g_task_propagate_int (task, &error);
- g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
-@@ -1687,18 +1687,18 @@ test_return_on_cancel_sync (void)
-
- g_object_unref (task);
-
-- while (thread_state == THREAD_RUNNING)
-+ while (g_atomic_int_get (&thread_state) == THREAD_RUNNING)
- g_cond_wait (&roc_finish_cond, &roc_finish_mutex);
- g_mutex_unlock (&roc_finish_mutex);
-
-- g_assert (thread_state == THREAD_CANCELLED);
-+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_CANCELLED);
-
- g_cancellable_reset (cancellable);
-
- /* If the task is already cancelled before it starts, it returns
- * immediately, but the thread func still runs.
- */
-- thread_state = THREAD_STARTING;
-+ g_atomic_int_set (&thread_state, THREAD_STARTING);
- task = g_task_new (NULL, cancellable, run_in_thread_sync_callback, NULL);
- g_task_set_return_on_cancel (task, TRUE);
-
-@@ -1711,7 +1711,7 @@ test_return_on_cancel_sync (void)
- cancel_sync_runner_thread, task);
-
- g_thread_join (runner_thread);
-- g_assert (thread_state == THREAD_STARTING);
-+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_STARTING);
-
- ret = g_task_propagate_int (task, &error);
- g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
-@@ -1720,17 +1720,17 @@ test_return_on_cancel_sync (void)
-
- g_object_unref (task);
-
-- while (thread_state == THREAD_STARTING)
-+ while (g_atomic_int_get (&thread_state) == THREAD_STARTING)
- g_cond_wait (&roc_init_cond, &roc_init_mutex);
- g_mutex_unlock (&roc_init_mutex);
-
-- g_assert (thread_state == THREAD_RUNNING);
-+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_RUNNING);
-
-- while (thread_state == THREAD_RUNNING)
-+ while (g_atomic_int_get (&thread_state) == THREAD_RUNNING)
- g_cond_wait (&roc_finish_cond, &roc_finish_mutex);
- g_mutex_unlock (&roc_finish_mutex);
-
-- g_assert (thread_state == THREAD_CANCELLED);
-+ g_assert_cmpint (g_atomic_int_get (&thread_state), ==, THREAD_CANCELLED);
-
- g_object_unref (cancellable);
- }
-@@ -1776,7 +1776,7 @@ return_on_cancel_atomic_thread (GTask
- gpointer task_data,
- GCancellable *cancellable)
- {
-- gint *state = task_data;
-+ gint *state = task_data; /* (atomic) */
-
- g_assert (source_object == g_task_get_source_object (task));
- g_assert (task_data == g_task_get_task_data (task));
-@@ -1784,34 +1784,34 @@ return_on_cancel_atomic_thread (GTask
- g_assert_false (g_task_get_completed (task));
-
- g_assert (g_thread_self () != main_thread);
-- g_assert_cmpint (*state, ==, 0);
-+ g_assert_cmpint (g_atomic_int_get (state), ==, 0);
-
- g_mutex_lock (&roca_mutex_1);
-- *state = 1;
-+ g_atomic_int_set (state, 1);
- g_cond_signal (&roca_cond_1);
- g_mutex_unlock (&roca_mutex_1);
-
- g_mutex_lock (&roca_mutex_2);
- if (g_task_set_return_on_cancel (task, FALSE))
-- *state = 2;
-+ g_atomic_int_set (state, 2);
- else
-- *state = 3;
-+ g_atomic_int_set (state, 3);
- g_cond_signal (&roca_cond_2);
- g_mutex_unlock (&roca_mutex_2);
-
- g_mutex_lock (&roca_mutex_1);
- if (g_task_set_return_on_cancel (task, TRUE))
-- *state = 4;
-+ g_atomic_int_set (state, 4);
- else
-- *state = 5;
-+ g_atomic_int_set (state, 5);
- g_cond_signal (&roca_cond_1);
- g_mutex_unlock (&roca_mutex_1);
-
- g_mutex_lock (&roca_mutex_2);
- if (g_task_set_return_on_cancel (task, TRUE))
-- *state = 6;
-+ g_atomic_int_set (state, 6);
- else
-- *state = 7;
-+ g_atomic_int_set (state, 7);
- g_cond_signal (&roca_cond_2);
- g_mutex_unlock (&roca_mutex_2);
-
-@@ -1823,7 +1823,7 @@ test_return_on_cancel_atomic (void)
- {
- GTask *task;
- GCancellable *cancellable;
-- volatile gint state;
-+ gint state; /* (atomic) */
- gboolean notification_emitted = FALSE;
- gboolean callback_ran;
-
-@@ -1832,7 +1832,7 @@ test_return_on_cancel_atomic (void)
- g_mutex_lock (&roca_mutex_2);
-
- /* If we don't cancel it, each set_return_on_cancel() call will succeed */
-- state = 0;
-+ g_atomic_int_set (&state, 0);
- callback_ran = FALSE;
- task = g_task_new (NULL, cancellable, return_on_cancel_atomic_callback, &callback_ran);
- g_task_set_return_on_cancel (task, TRUE);
-@@ -1843,23 +1843,23 @@ test_return_on_cancel_atomic (void)
- g_task_run_in_thread (task, return_on_cancel_atomic_thread);
- g_object_unref (task);
-
-- g_assert_cmpint (state, ==, 0);
-+ g_assert_cmpint (g_atomic_int_get (&state), ==, 0);
-
-- while (state == 0)
-+ while (g_atomic_int_get (&state) == 0)
- g_cond_wait (&roca_cond_1, &roca_mutex_1);
-- g_assert (state == 1);
-+ g_assert_cmpint (g_atomic_int_get (&state), ==, 1);
-
-- while (state == 1)
-+ while (g_atomic_int_get (&state) == 1)
- g_cond_wait (&roca_cond_2, &roca_mutex_2);
-- g_assert (state == 2);
-+ g_assert_cmpint (g_atomic_int_get (&state), ==, 2);
-
-- while (state == 2)
-+ while (g_atomic_int_get (&state) == 2)
- g_cond_wait (&roca_cond_1, &roca_mutex_1);
-- g_assert (state == 4);
-+ g_assert_cmpint (g_atomic_int_get (&state), ==, 4);
-
-- while (state == 4)
-+ while (g_atomic_int_get (&state) == 4)
- g_cond_wait (&roca_cond_2, &roca_mutex_2);
-- g_assert (state == 6);
-+ g_assert_cmpint (g_atomic_int_get (&state), ==, 6);
-
- /* callback assumes there'll be a cancelled error */
- g_cancellable_cancel (cancellable);
-@@ -1876,7 +1876,7 @@ test_return_on_cancel_atomic (void)
- * task won't complete right away, and further
- * g_task_set_return_on_cancel() calls will return FALSE.
- */
-- state = 0;
-+ g_atomic_int_set (&state, 0);
- callback_ran = FALSE;
- notification_emitted = FALSE;
- task = g_task_new (NULL, cancellable, return_on_cancel_atomic_callback, &callback_ran);
-@@ -1887,16 +1887,16 @@ test_return_on_cancel_atomic (void)
- g_task_set_task_data (task, (gpointer)&state, NULL);
- g_task_run_in_thread (task, return_on_cancel_atomic_thread);
-
-- g_assert_cmpint (state, ==, 0);
-+ g_assert_cmpint (g_atomic_int_get (&state), ==, 0);
-
-- while (state == 0)
-+ while (g_atomic_int_get (&state) == 0)
- g_cond_wait (&roca_cond_1, &roca_mutex_1);
-- g_assert (state == 1);
-+ g_assert_cmpint (g_atomic_int_get (&state), ==, 1);
- g_assert (g_task_get_return_on_cancel (task));
-
-- while (state == 1)
-+ while (g_atomic_int_get (&state) == 1)
- g_cond_wait (&roca_cond_2, &roca_mutex_2);
-- g_assert (state == 2);
-+ g_assert_cmpint (g_atomic_int_get (&state), ==, 2);
- g_assert (!g_task_get_return_on_cancel (task));
-
- g_cancellable_cancel (cancellable);
-@@ -1904,18 +1904,18 @@ test_return_on_cancel_atomic (void)
- g_main_loop_run (loop);
- g_assert (callback_ran == FALSE);
-
-- while (state == 2)
-+ while (g_atomic_int_get (&state) == 2)
- g_cond_wait (&roca_cond_1, &roca_mutex_1);
-- g_assert (state == 5);
-+ g_assert_cmpint (g_atomic_int_get (&state), ==, 5);
- g_assert (!g_task_get_return_on_cancel (task));
-
- g_main_loop_run (loop);
- g_assert (callback_ran == TRUE);
- g_assert_true (notification_emitted);
-
-- while (state == 5)
-+ while (g_atomic_int_get (&state) == 5)
- g_cond_wait (&roca_cond_2, &roca_mutex_2);
-- g_assert (state == 7);
-+ g_assert_cmpint (g_atomic_int_get (&state), ==, 7);
-
- g_object_unref (cancellable);
- g_mutex_unlock (&roca_mutex_1);
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0006-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch b/meta/recipes-core/glib-2.0/glib-2.0/0006-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch
deleted file mode 100644
index 7f22b4d46b..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0006-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From f4607def1695efb50eb49e0586eed0f5557935f2 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 18:20:37 +0000
-Subject: [PATCH 06/29] tests: Drop unnecessary volatile qualifiers from tests
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-These variables were already (correctly) accessed atomically. The
-`volatile` qualifier doesn’t help with that.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- gio/tests/g-file-info.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gio/tests/g-file-info.c b/gio/tests/g-file-info.c
-index 809b0ec79..1a02b5e0e 100644
---- a/gio/tests/g-file-info.c
-+++ b/gio/tests/g-file-info.c
-@@ -221,7 +221,7 @@ test_internal_enhanced_stdio (void)
- guint64 size_p0, alsize_p0, size_ps, alsize_ps;
- const gchar *id_p0;
- const gchar *id_p1;
-- volatile guint64 time_p0;
-+ guint64 time_p0;
- gchar *tmp_dir;
- wchar_t *programdata_dir_w;
- wchar_t *users_dir_w;
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0007-gdbusconnection-Drop-unnecessary-volatile-qualifiers.patch b/meta/recipes-core/glib-2.0/glib-2.0/0007-gdbusconnection-Drop-unnecessary-volatile-qualifiers.patch
deleted file mode 100644
index 78753f821a..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0007-gdbusconnection-Drop-unnecessary-volatile-qualifiers.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From 33612404397f87f0cd45da90d3aa9ab60df895ee Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 18:24:28 +0000
-Subject: [PATCH 07/29] gdbusconnection: Drop unnecessary volatile qualifiers
- from variables
-
-This should introduce no API changes; there are public functions
-exported by `GDBusConnection` which still have some (incorrectly)
-`volatile` arguments, but dropping those qualifiers would be an API
-break.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- gio/gdbusconnection.c | 22 +++++++++++-----------
- 1 file changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
-index ed8cf6219..91c365e80 100644
---- a/gio/gdbusconnection.c
-+++ b/gio/gdbusconnection.c
-@@ -393,7 +393,7 @@ struct _GDBusConnection
- * FLAG_CLOSED is the closed property. It may be read at any time, but
- * may only be written while holding @lock.
- */
-- volatile gint atomic_flags;
-+ gint atomic_flags; /* (atomic) */
-
- /* If the connection could not be established during initable_init(),
- * this GError will be set.
-@@ -1596,7 +1596,7 @@ static gboolean
- g_dbus_connection_send_message_unlocked (GDBusConnection *connection,
- GDBusMessage *message,
- GDBusSendMessageFlags flags,
-- volatile guint32 *out_serial,
-+ guint32 *out_serial,
- GError **error)
- {
- guchar *blob;
-@@ -1741,7 +1741,7 @@ g_dbus_connection_send_message (GDBusConnection *connection,
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
-
- CONNECTION_LOCK (connection);
-- ret = g_dbus_connection_send_message_unlocked (connection, message, flags, out_serial, error);
-+ ret = g_dbus_connection_send_message_unlocked (connection, message, flags, (guint32 *) out_serial, error);
- CONNECTION_UNLOCK (connection);
- return ret;
- }
-@@ -1901,7 +1901,7 @@ g_dbus_connection_send_message_with_reply_unlocked (GDBusConnection *connect
- GDBusMessage *message,
- GDBusSendMessageFlags flags,
- gint timeout_msec,
-- volatile guint32 *out_serial,
-+ guint32 *out_serial,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
-@@ -1909,7 +1909,7 @@ g_dbus_connection_send_message_with_reply_unlocked (GDBusConnection *connect
- GTask *task;
- SendMessageData *data;
- GError *error = NULL;
-- volatile guint32 serial;
-+ guint32 serial;
-
- if (out_serial == NULL)
- out_serial = &serial;
-@@ -2022,7 +2022,7 @@ g_dbus_connection_send_message_with_reply (GDBusConnection *connection,
- message,
- flags,
- timeout_msec,
-- out_serial,
-+ (guint32 *) out_serial,
- cancellable,
- callback,
- user_data);
-@@ -3082,7 +3082,7 @@ g_dbus_connection_get_peer_credentials (GDBusConnection *connection)
-
- /* ---------------------------------------------------------------------------------------------------- */
-
--static volatile guint _global_filter_id = 1;
-+static guint _global_filter_id = 1; /* (atomic) */
-
- /**
- * g_dbus_connection_add_filter:
-@@ -3327,9 +3327,9 @@ args_to_rule (const gchar *sender,
- return g_string_free (rule, FALSE);
- }
-
--static volatile guint _global_subscriber_id = 1;
--static volatile guint _global_registration_id = 1;
--static volatile guint _global_subtree_registration_id = 1;
-+static guint _global_subscriber_id = 1; /* (atomic) */
-+static guint _global_registration_id = 1; /* (atomic) */
-+static guint _global_subtree_registration_id = 1; /* (atomic) */
-
- /* ---------------------------------------------------------------------------------------------------- */
-
-@@ -5992,7 +5992,7 @@ g_dbus_connection_call_sync_internal (GDBusConnection *connection,
- message,
- send_flags,
- timeout_msec,
-- NULL, /* volatile guint32 *out_serial */
-+ NULL, /* guint32 *out_serial */
- cancellable,
- &local_error);
-
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0008-gdbuserror-Drop-unnecessary-volatile-qualifiers-from.patch b/meta/recipes-core/glib-2.0/glib-2.0/0008-gdbuserror-Drop-unnecessary-volatile-qualifiers-from.patch
deleted file mode 100644
index e947a264c5..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0008-gdbuserror-Drop-unnecessary-volatile-qualifiers-from.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From 7c7623c4a31fb0f2a7176c43acc728093818b58c Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 18:26:19 +0000
-Subject: [PATCH 08/29] gdbuserror: Drop unnecessary volatile qualifiers from
- variables
-
-This should introduce no API changes. The
-`g_dbus_error_register_error_domain()` function still (incorrectly) has
-a `volatile` argument, but dropping that qualifier would be an API
-break.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- gio/gdbuserror.c | 28 +++++++++++++++++-----------
- 1 file changed, 17 insertions(+), 11 deletions(-)
-
-diff --git a/gio/gdbuserror.c b/gio/gdbuserror.c
-index 682677354..b03a33f27 100644
---- a/gio/gdbuserror.c
-+++ b/gio/gdbuserror.c
-@@ -84,12 +84,12 @@
- * GQuark
- * foo_bar_error_quark (void)
- * {
-- * static volatile gsize quark_volatile = 0;
-+ * static gsize quark = 0;
- * g_dbus_error_register_error_domain ("foo-bar-error-quark",
-- * &quark_volatile,
-+ * &quark,
- * foo_bar_error_entries,
- * G_N_ELEMENTS (foo_bar_error_entries));
-- * return (GQuark) quark_volatile;
-+ * return (GQuark) quark;
- * }
- * ]|
- * With this setup, a D-Bus peer can transparently pass e.g. %FOO_BAR_ERROR_ANOTHER_ERROR and
-@@ -160,12 +160,12 @@ GQuark
- g_dbus_error_quark (void)
- {
- G_STATIC_ASSERT (G_N_ELEMENTS (g_dbus_error_entries) - 1 == G_DBUS_ERROR_PROPERTY_READ_ONLY);
-- static volatile gsize quark_volatile = 0;
-+ static gsize quark = 0;
- g_dbus_error_register_error_domain ("g-dbus-error-quark",
-- &quark_volatile,
-+ &quark,
- g_dbus_error_entries,
- G_N_ELEMENTS (g_dbus_error_entries));
-- return (GQuark) quark_volatile;
-+ return (GQuark) quark;
- }
-
- /**
-@@ -185,25 +185,31 @@ g_dbus_error_register_error_domain (const gchar *error_domain_quark_na
- const GDBusErrorEntry *entries,
- guint num_entries)
- {
-+ gsize *quark;
-+
- g_return_if_fail (error_domain_quark_name != NULL);
- g_return_if_fail (quark_volatile != NULL);
- g_return_if_fail (entries != NULL);
- g_return_if_fail (num_entries > 0);
-
-- if (g_once_init_enter (quark_volatile))
-+ /* Drop the volatile qualifier, which should never have been on the argument
-+ * in the first place. */
-+ quark = (gsize *) quark_volatile;
-+
-+ if (g_once_init_enter (quark))
- {
- guint n;
-- GQuark quark;
-+ GQuark new_quark;
-
-- quark = g_quark_from_static_string (error_domain_quark_name);
-+ new_quark = g_quark_from_static_string (error_domain_quark_name);
-
- for (n = 0; n < num_entries; n++)
- {
-- g_warn_if_fail (g_dbus_error_register_error (quark,
-+ g_warn_if_fail (g_dbus_error_register_error (new_quark,
- entries[n].error_code,
- entries[n].dbus_error_name));
- }
-- g_once_init_leave (quark_volatile, quark);
-+ g_once_init_leave (quark, new_quark);
- }
- }
-
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0009-gio-Drop-unnecessary-volatile-qualifiers-from-intern.patch b/meta/recipes-core/glib-2.0/glib-2.0/0009-gio-Drop-unnecessary-volatile-qualifiers-from-intern.patch
deleted file mode 100644
index 7897d43bb0..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0009-gio-Drop-unnecessary-volatile-qualifiers-from-intern.patch
+++ /dev/null
@@ -1,207 +0,0 @@
-From 74250cd9c9dfd3ad428e445c095ceac88ba18691 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 18:28:23 +0000
-Subject: [PATCH 09/29] gio: Drop unnecessary volatile qualifiers from internal
- variables
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-These variables were already (correctly) accessed atomically. The
-`volatile` qualifier doesn’t help with that.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- gio/gdbusinterfaceskeleton.c | 2 +-
- gio/gdbusintrospection.h | 14 +++++++-------
- gio/gdbusnameowning.c | 4 ++--
- gio/gdbusnamewatching.c | 4 ++--
- gio/gdbusprivate.c | 10 +++++-----
- gio/gnetworking.c | 2 +-
- 6 files changed, 18 insertions(+), 18 deletions(-)
-
-diff --git a/gio/gdbusinterfaceskeleton.c b/gio/gdbusinterfaceskeleton.c
-index 243b4a0a4..76398df36 100644
---- a/gio/gdbusinterfaceskeleton.c
-+++ b/gio/gdbusinterfaceskeleton.c
-@@ -458,7 +458,7 @@ dbus_interface_interface_init (GDBusInterfaceIface *iface)
-
- typedef struct
- {
-- volatile gint ref_count;
-+ gint ref_count; /* (atomic) */
- GDBusInterfaceSkeleton *interface;
- GDBusInterfaceMethodCallFunc method_call_func;
- GDBusMethodInvocation *invocation;
-diff --git a/gio/gdbusintrospection.h b/gio/gdbusintrospection.h
-index 14b171055..f2e291787 100644
---- a/gio/gdbusintrospection.h
-+++ b/gio/gdbusintrospection.h
-@@ -43,7 +43,7 @@ G_BEGIN_DECLS
- struct _GDBusAnnotationInfo
- {
- /*< public >*/
-- volatile gint ref_count;
-+ gint ref_count; /* (atomic) */
- gchar *key;
- gchar *value;
- GDBusAnnotationInfo **annotations;
-@@ -63,7 +63,7 @@ struct _GDBusAnnotationInfo
- struct _GDBusArgInfo
- {
- /*< public >*/
-- volatile gint ref_count;
-+ gint ref_count; /* (atomic) */
- gchar *name;
- gchar *signature;
- GDBusAnnotationInfo **annotations;
-@@ -84,7 +84,7 @@ struct _GDBusArgInfo
- struct _GDBusMethodInfo
- {
- /*< public >*/
-- volatile gint ref_count;
-+ gint ref_count; /* (atomic) */
- gchar *name;
- GDBusArgInfo **in_args;
- GDBusArgInfo **out_args;
-@@ -105,7 +105,7 @@ struct _GDBusMethodInfo
- struct _GDBusSignalInfo
- {
- /*< public >*/
-- volatile gint ref_count;
-+ gint ref_count; /* (atomic) */
- gchar *name;
- GDBusArgInfo **args;
- GDBusAnnotationInfo **annotations;
-@@ -126,7 +126,7 @@ struct _GDBusSignalInfo
- struct _GDBusPropertyInfo
- {
- /*< public >*/
-- volatile gint ref_count;
-+ gint ref_count; /* (atomic) */
- gchar *name;
- gchar *signature;
- GDBusPropertyInfoFlags flags;
-@@ -149,7 +149,7 @@ struct _GDBusPropertyInfo
- struct _GDBusInterfaceInfo
- {
- /*< public >*/
-- volatile gint ref_count;
-+ gint ref_count; /* (atomic) */
- gchar *name;
- GDBusMethodInfo **methods;
- GDBusSignalInfo **signals;
-@@ -172,7 +172,7 @@ struct _GDBusInterfaceInfo
- struct _GDBusNodeInfo
- {
- /*< public >*/
-- volatile gint ref_count;
-+ gint ref_count; /* (atomic) */
- gchar *path;
- GDBusInterfaceInfo **interfaces;
- GDBusNodeInfo **nodes;
-diff --git a/gio/gdbusnameowning.c b/gio/gdbusnameowning.c
-index d20e6ffed..1130d6789 100644
---- a/gio/gdbusnameowning.c
-+++ b/gio/gdbusnameowning.c
-@@ -55,7 +55,7 @@ typedef enum
-
- typedef struct
- {
-- volatile gint ref_count;
-+ gint ref_count; /* (atomic) */
- guint id;
- GBusNameOwnerFlags flags;
- gchar *name;
-@@ -73,7 +73,7 @@ typedef struct
- guint name_acquired_subscription_id;
- guint name_lost_subscription_id;
-
-- volatile gboolean cancelled; /* must hold lock when reading or modifying */
-+ gboolean cancelled; /* must hold lock when reading or modifying */
-
- gboolean needs_release;
- } Client;
-diff --git a/gio/gdbusnamewatching.c b/gio/gdbusnamewatching.c
-index bc2a9119e..8d24700c5 100644
---- a/gio/gdbusnamewatching.c
-+++ b/gio/gdbusnamewatching.c
-@@ -56,7 +56,7 @@ typedef enum
-
- typedef struct
- {
-- volatile gint ref_count;
-+ gint ref_count; /* (atomic) */
- guint id;
- gchar *name;
- GBusNameWatcherFlags flags;
-@@ -78,7 +78,7 @@ typedef struct
- } Client;
-
- /* Must be accessed atomically. */
--static volatile guint next_global_id = 1;
-+static guint next_global_id = 1; /* (atomic) */
-
- /* Must be accessed with @lock held. */
- static GHashTable *map_id_to_client = NULL;
-diff --git a/gio/gdbusprivate.c b/gio/gdbusprivate.c
-index 2551e4791..99b37f3eb 100644
---- a/gio/gdbusprivate.c
-+++ b/gio/gdbusprivate.c
-@@ -265,7 +265,7 @@ ensure_required_types (void)
-
- typedef struct
- {
-- volatile gint refcount;
-+ gint refcount; /* (atomic) */
- GThread *thread;
- GMainContext *context;
- GMainLoop *loop;
-@@ -341,12 +341,12 @@ typedef enum {
-
- struct GDBusWorker
- {
-- volatile gint ref_count;
-+ gint ref_count; /* (atomic) */
-
- SharedThreadData *shared_thread_data;
-
- /* really a boolean, but GLib 2.28 lacks atomic boolean ops */
-- volatile gint stopped;
-+ gint stopped; /* (atomic) */
-
- /* TODO: frozen (e.g. G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING) currently
- * only affects messages received from the other peer (since GDBusServer is the
-@@ -1941,11 +1941,11 @@ _g_dbus_debug_print_unlock (void)
- void
- _g_dbus_initialize (void)
- {
-- static volatile gsize initialized = 0;
-+ static gsize initialized = 0;
-
- if (g_once_init_enter (&initialized))
- {
-- volatile GQuark g_dbus_error_domain;
-+ GQuark g_dbus_error_domain;
- const gchar *debug;
-
- g_dbus_error_domain = G_DBUS_ERROR;
-diff --git a/gio/gnetworking.c b/gio/gnetworking.c
-index 05507fe70..7bc6d73c4 100644
---- a/gio/gnetworking.c
-+++ b/gio/gnetworking.c
-@@ -61,7 +61,7 @@ void
- g_networking_init (void)
- {
- #ifdef G_OS_WIN32
-- static volatile gsize inited = 0;
-+ static gsize inited = 0;
-
- if (g_once_init_enter (&inited))
- {
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch b/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch
index 1c645f3a9a..6dff5179c7 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch
@@ -1,11 +1,10 @@
-From 79ce7e545dd3a93f77d2146d50b6fa061fbceed9 Mon Sep 17 00:00:00 2001
+From 50636758c73e5e61212a8f801c6c602b8aab5ba7 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Tue, 3 Oct 2017 10:45:55 +0300
Subject: [PATCH] Do not hardcode python path into various tools
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
---
gio/gdbus-2.0/codegen/gdbus-codegen.in | 2 +-
gobject/glib-genmarshal.in | 2 +-
@@ -23,7 +22,7 @@ index 67d3675..4e92a7a 100755
# GDBus - GLib D-Bus Library
#
diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in
-index 7380f24..c8abeaa 100755
+index aa5af43..56e8e2e 100755
--- a/gobject/glib-genmarshal.in
+++ b/gobject/glib-genmarshal.in
@@ -1,4 +1,4 @@
@@ -33,7 +32,7 @@ index 7380f24..c8abeaa 100755
# pylint: disable=too-many-lines, missing-docstring, invalid-name
diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in
-index 91ad779..3ebef62 100755
+index 353e53a..8ed6c39 100755
--- a/gobject/glib-mkenums.in
+++ b/gobject/glib-mkenums.in
@@ -1,4 +1,4 @@
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0010-kqueue-Fix-unlocked-access-to-shared-variable.patch b/meta/recipes-core/glib-2.0/glib-2.0/0010-kqueue-Fix-unlocked-access-to-shared-variable.patch
deleted file mode 100644
index e52b709422..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0010-kqueue-Fix-unlocked-access-to-shared-variable.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From e4e88688a0722237effc56cc21438d0c8e82de88 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 18:29:26 +0000
-Subject: [PATCH 10/29] kqueue: Fix unlocked access to shared variable
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-And drop the `volatile` qualifier because it doesn’t help.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- gio/kqueue/kqueue-missing.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/gio/kqueue/kqueue-missing.c b/gio/kqueue/kqueue-missing.c
-index 37af82e5b..d1ffdf4bd 100644
---- a/gio/kqueue/kqueue-missing.c
-+++ b/gio/kqueue/kqueue-missing.c
-@@ -34,7 +34,7 @@ static gboolean km_debug_enabled = FALSE;
- static GSList *missing_subs_list = NULL;
- G_LOCK_DEFINE_STATIC (missing_lock);
-
--static volatile gboolean scan_missing_running = FALSE;
-+static gboolean scan_missing_running = FALSE; /* must be accessed under @missing_lock */
-
-
- static gboolean
-@@ -62,7 +62,6 @@ _km_add_missing (kqueue_sub *sub)
-
- KM_W ("adding %s to missing list\n", sub->filename);
- missing_subs_list = g_slist_prepend (missing_subs_list, sub);
-- G_UNLOCK (missing_lock);
-
- if (!scan_missing_running)
- {
-@@ -73,6 +72,8 @@ _km_add_missing (kqueue_sub *sub)
- g_source_attach (source, GLIB_PRIVATE_CALL (g_get_worker_context) ());
- g_source_unref (source);
- }
-+
-+ G_UNLOCK (missing_lock);
- }
-
- /**
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0011-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch b/meta/recipes-core/glib-2.0/glib-2.0/0011-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch
deleted file mode 100644
index ea3fd9f6e9..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0011-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From 7cdb68713c1863a27ad82d801756ec74097e8e87 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 18:30:36 +0000
-Subject: [PATCH 11/29] tests: Drop unnecessary volatile qualifiers from tests
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-These variables were already (correctly) accessed atomically. The
-`volatile` qualifier doesn’t help with that.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- tests/gobject/performance-threaded.c | 2 +-
- tests/gobject/performance.c | 4 ++--
- tests/onceinit.c | 16 ++++++++--------
- 3 files changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/tests/gobject/performance-threaded.c b/tests/gobject/performance-threaded.c
-index 30ea5bd80..c98541d66 100644
---- a/tests/gobject/performance-threaded.c
-+++ b/tests/gobject/performance-threaded.c
-@@ -52,7 +52,7 @@ static GType liststore_interfaces[6];
- static gpointer
- register_types (void)
- {
-- static volatile gsize inited = 0;
-+ static gsize inited = 0;
- if (g_once_init_enter (&inited))
- {
- liststore_interfaces[0] = simple_register_class ("GtkBuildable", G_TYPE_INTERFACE, 0);
-diff --git a/tests/gobject/performance.c b/tests/gobject/performance.c
-index 236ffaed0..163be58b4 100644
---- a/tests/gobject/performance.c
-+++ b/tests/gobject/performance.c
-@@ -575,8 +575,8 @@ test_type_check_run (PerformanceTest *test,
- gpointer _data)
- {
- struct TypeCheckTest *data = _data;
-- volatile GObject *object = data->object;
-- volatile GType type, types[5];
-+ GObject *object = data->object;
-+ GType type, types[5];
- int i, j;
-
- types[0] = test_iface1_get_type ();
-diff --git a/tests/onceinit.c b/tests/onceinit.c
-index 89ba6a136..9788efcbd 100644
---- a/tests/onceinit.c
-+++ b/tests/onceinit.c
-@@ -25,13 +25,13 @@
-
- static GMutex tmutex;
- static GCond tcond;
--static volatile int thread_call_count = 0;
-+static int thread_call_count = 0; /* (atomic) */
- static char dummy_value = 'x';
-
- static void
- assert_singleton_execution1 (void)
- {
-- static volatile int seen_execution = 0;
-+ static int seen_execution = 0; /* (atomic) */
- int old_seen_execution = g_atomic_int_add (&seen_execution, 1);
- if (old_seen_execution != 0)
- g_error ("%s: function executed more than once", G_STRFUNC);
-@@ -40,7 +40,7 @@ assert_singleton_execution1 (void)
- static void
- assert_singleton_execution2 (void)
- {
-- static volatile int seen_execution = 0;
-+ static int seen_execution = 0; /* (atomic) */
- int old_seen_execution = g_atomic_int_add (&seen_execution, 1);
- if (old_seen_execution != 0)
- g_error ("%s: function executed more than once", G_STRFUNC);
-@@ -49,7 +49,7 @@ assert_singleton_execution2 (void)
- static void
- assert_singleton_execution3 (void)
- {
-- static volatile int seen_execution = 0;
-+ static int seen_execution = 0; /* (atomic) */
- int old_seen_execution = g_atomic_int_add (&seen_execution, 1);
- if (old_seen_execution != 0)
- g_error ("%s: function executed more than once", G_STRFUNC);
-@@ -58,7 +58,7 @@ assert_singleton_execution3 (void)
- static void
- initializer1 (void)
- {
-- static volatile gsize initialized = 0;
-+ static gsize initialized = 0;
- if (g_once_init_enter (&initialized))
- {
- gsize initval = 42;
-@@ -70,7 +70,7 @@ initializer1 (void)
- static gpointer
- initializer2 (void)
- {
-- static volatile gsize initialized = 0;
-+ static gsize initialized = 0;
- if (g_once_init_enter (&initialized))
- {
- void *pointer_value = &dummy_value;
-@@ -83,7 +83,7 @@ initializer2 (void)
- static void
- initializer3 (void)
- {
-- static volatile gsize initialized = 0;
-+ static gsize initialized = 0;
- if (g_once_init_enter (&initialized))
- {
- gsize initval = 42;
-@@ -163,7 +163,7 @@ main (int argc,
- static void \
- test_initializer_##N (void) \
- { \
-- static volatile gsize initialized = 0; \
-+ static gsize initialized = 0; \
- if (g_once_init_enter (&initialized)) \
- { \
- g_free (g_strdup_printf ("cpuhog%5d", 1)); \
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0012-tests-Fix-non-atomic-access-to-some-shared-variables.patch b/meta/recipes-core/glib-2.0/glib-2.0/0012-tests-Fix-non-atomic-access-to-some-shared-variables.patch
deleted file mode 100644
index be7fcba8c8..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0012-tests-Fix-non-atomic-access-to-some-shared-variables.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From 1a7f0002a052725fb646e136fadd5dad66222d7f Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 18:31:01 +0000
-Subject: [PATCH 12/29] tests: Fix non-atomic access to some shared variables
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-And drop the `volatile` qualifier from the variables, as that doesn’t
-help with thread safety.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- tests/refcount/objects.c | 8 ++++----
- tests/refcount/properties3.c | 8 ++++----
- 2 files changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/tests/refcount/objects.c b/tests/refcount/objects.c
-index 963766d00..0c471a42b 100644
---- a/tests/refcount/objects.c
-+++ b/tests/refcount/objects.c
-@@ -26,7 +26,7 @@ struct _GTestClass
- };
-
- static GType my_test_get_type (void);
--static volatile gboolean stopping;
-+static gint stopping; /* (atomic) */
-
- static void my_test_class_init (GTestClass * klass);
- static void my_test_init (GTest * test);
-@@ -101,7 +101,7 @@ run_thread (GTest * test)
- {
- gint i = 1;
-
-- while (!stopping) {
-+ while (!g_atomic_int_get (&stopping)) {
- my_test_do_refcount (test);
- if ((i++ % 10000) == 0) {
- g_print (".");
-@@ -128,7 +128,7 @@ main (int argc, char **argv)
-
- test_threads = g_array_new (FALSE, FALSE, sizeof (GThread *));
-
-- stopping = FALSE;
-+ g_atomic_int_set (&stopping, 0);
-
- for (i = 0; i < n_threads; i++) {
- GThread *thread;
-@@ -141,7 +141,7 @@ main (int argc, char **argv)
- }
- g_usleep (5000000);
-
-- stopping = TRUE;
-+ g_atomic_int_set (&stopping, 1);
-
- g_print ("\nstopping\n");
-
-diff --git a/tests/refcount/properties3.c b/tests/refcount/properties3.c
-index bc8820661..31f26a46e 100644
---- a/tests/refcount/properties3.c
-+++ b/tests/refcount/properties3.c
-@@ -34,7 +34,7 @@ struct _GTestClass
- static GType my_test_get_type (void);
- G_DEFINE_TYPE (GTest, my_test, G_TYPE_OBJECT)
-
--static volatile gboolean stopping;
-+static gint stopping; /* (atomic) */
-
- static void my_test_get_property (GObject *object,
- guint prop_id,
-@@ -140,7 +140,7 @@ run_thread (GTest * test)
- {
- gint i = 1;
-
-- while (!stopping) {
-+ while (!g_atomic_int_get (&stopping)) {
- my_test_do_property (test);
- if ((i++ % 10000) == 0)
- {
-@@ -170,7 +170,7 @@ main (int argc, char **argv)
-
- test_threads = g_array_new (FALSE, FALSE, sizeof (GThread *));
-
-- stopping = FALSE;
-+ g_atomic_int_set (&stopping, 0);
-
- for (i = 0; i < n_threads; i++) {
- GThread *thread;
-@@ -180,7 +180,7 @@ main (int argc, char **argv)
- }
- g_usleep (30000000);
-
-- stopping = TRUE;
-+ g_atomic_int_set (&stopping, 1);
- g_print ("\nstopping\n");
-
- /* join all threads */
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0013-gatomic-Drop-unnecessary-volatile-qualifiers-from-in.patch b/meta/recipes-core/glib-2.0/glib-2.0/0013-gatomic-Drop-unnecessary-volatile-qualifiers-from-in.patch
deleted file mode 100644
index efc6817bd1..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0013-gatomic-Drop-unnecessary-volatile-qualifiers-from-in.patch
+++ /dev/null
@@ -1,180 +0,0 @@
-From 3c648457c284b4ba313b8591008d2e18ae4335eb Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 18:36:37 +0000
-Subject: [PATCH 13/29] gatomic: Drop unnecessary volatile qualifiers from
- internal variables
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-It’s not necessary and provides no thread safety guarantees.
-
-The `volatile` qualifiers on the function arguments have to be kept, as
-they are (unfortunately) part of the API.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- glib/gatomic.c | 34 +++++++++++++++++-----------------
- 1 file changed, 17 insertions(+), 17 deletions(-)
-
-diff --git a/glib/gatomic.c b/glib/gatomic.c
-index 8b8c6453d..67f5ba6b4 100644
---- a/glib/gatomic.c
-+++ b/glib/gatomic.c
-@@ -316,7 +316,7 @@ guint
- gpointer
- (g_atomic_pointer_get) (const volatile void *atomic)
- {
-- return g_atomic_pointer_get ((const volatile gpointer *) atomic);
-+ return g_atomic_pointer_get ((gpointer *) atomic);
- }
-
- /**
-@@ -335,7 +335,7 @@ void
- (g_atomic_pointer_set) (volatile void *atomic,
- gpointer newval)
- {
-- g_atomic_pointer_set ((volatile gpointer *) atomic, newval);
-+ g_atomic_pointer_set ((gpointer *) atomic, newval);
- }
-
- /**
-@@ -363,7 +363,7 @@ gboolean
- gpointer oldval,
- gpointer newval)
- {
-- return g_atomic_pointer_compare_and_exchange ((volatile gpointer *) atomic,
-+ return g_atomic_pointer_compare_and_exchange ((gpointer *) atomic,
- oldval, newval);
- }
-
-@@ -387,7 +387,7 @@ gssize
- (g_atomic_pointer_add) (volatile void *atomic,
- gssize val)
- {
-- return g_atomic_pointer_add ((volatile gpointer *) atomic, val);
-+ return g_atomic_pointer_add ((gpointer *) atomic, val);
- }
-
- /**
-@@ -411,7 +411,7 @@ gsize
- (g_atomic_pointer_and) (volatile void *atomic,
- gsize val)
- {
-- return g_atomic_pointer_and ((volatile gpointer *) atomic, val);
-+ return g_atomic_pointer_and ((gpointer *) atomic, val);
- }
-
- /**
-@@ -435,7 +435,7 @@ gsize
- (g_atomic_pointer_or) (volatile void *atomic,
- gsize val)
- {
-- return g_atomic_pointer_or ((volatile gpointer *) atomic, val);
-+ return g_atomic_pointer_or ((gpointer *) atomic, val);
- }
-
- /**
-@@ -459,7 +459,7 @@ gsize
- (g_atomic_pointer_xor) (volatile void *atomic,
- gsize val)
- {
-- return g_atomic_pointer_xor ((volatile gpointer *) atomic, val);
-+ return g_atomic_pointer_xor ((gpointer *) atomic, val);
- }
-
- #elif defined (G_PLATFORM_WIN32)
-@@ -591,7 +591,7 @@ guint
- gpointer
- (g_atomic_pointer_get) (const volatile void *atomic)
- {
-- const volatile gpointer *ptr = atomic;
-+ const gpointer *ptr = atomic;
-
- MemoryBarrier ();
- return *ptr;
-@@ -601,7 +601,7 @@ void
- (g_atomic_pointer_set) (volatile void *atomic,
- gpointer newval)
- {
-- volatile gpointer *ptr = atomic;
-+ gpointer *ptr = atomic;
-
- *ptr = newval;
- MemoryBarrier ();
-@@ -797,7 +797,7 @@ guint
- gpointer
- (g_atomic_pointer_get) (const volatile void *atomic)
- {
-- const volatile gpointer *ptr = atomic;
-+ const gpointer *ptr = atomic;
- gpointer value;
-
- pthread_mutex_lock (&g_atomic_lock);
-@@ -811,7 +811,7 @@ void
- (g_atomic_pointer_set) (volatile void *atomic,
- gpointer newval)
- {
-- volatile gpointer *ptr = atomic;
-+ gpointer *ptr = atomic;
-
- pthread_mutex_lock (&g_atomic_lock);
- *ptr = newval;
-@@ -823,7 +823,7 @@ gboolean
- gpointer oldval,
- gpointer newval)
- {
-- volatile gpointer *ptr = atomic;
-+ gpointer *ptr = atomic;
- gboolean success;
-
- pthread_mutex_lock (&g_atomic_lock);
-@@ -840,7 +840,7 @@ gssize
- (g_atomic_pointer_add) (volatile void *atomic,
- gssize val)
- {
-- volatile gssize *ptr = atomic;
-+ gssize *ptr = atomic;
- gssize oldval;
-
- pthread_mutex_lock (&g_atomic_lock);
-@@ -855,7 +855,7 @@ gsize
- (g_atomic_pointer_and) (volatile void *atomic,
- gsize val)
- {
-- volatile gsize *ptr = atomic;
-+ gsize *ptr = atomic;
- gsize oldval;
-
- pthread_mutex_lock (&g_atomic_lock);
-@@ -870,7 +870,7 @@ gsize
- (g_atomic_pointer_or) (volatile void *atomic,
- gsize val)
- {
-- volatile gsize *ptr = atomic;
-+ gsize *ptr = atomic;
- gsize oldval;
-
- pthread_mutex_lock (&g_atomic_lock);
-@@ -885,7 +885,7 @@ gsize
- (g_atomic_pointer_xor) (volatile void *atomic,
- gsize val)
- {
-- volatile gsize *ptr = atomic;
-+ gsize *ptr = atomic;
- gsize oldval;
-
- pthread_mutex_lock (&g_atomic_lock);
-@@ -915,5 +915,5 @@ gint
- g_atomic_int_exchange_and_add (volatile gint *atomic,
- gint val)
- {
-- return (g_atomic_int_add) (atomic, val);
-+ return (g_atomic_int_add) ((gint *) atomic, val);
- }
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0014-gatomic-Drop-unnecessary-volatile-qualifiers-from-ma.patch b/meta/recipes-core/glib-2.0/glib-2.0/0014-gatomic-Drop-unnecessary-volatile-qualifiers-from-ma.patch
deleted file mode 100644
index bcc06e05cd..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0014-gatomic-Drop-unnecessary-volatile-qualifiers-from-ma.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 9474655eb21d64519b293e780bb686976cbdb790 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 18:38:36 +0000
-Subject: [PATCH 14/29] gatomic: Drop unnecessary volatile qualifiers from
- macro variables
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-It’s not necessary and provides no thread safety guarantees.
-
-The `volatile` qualifiers on the function arguments have to be kept, as
-they are (unfortunately) part of the API.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- glib/gatomic.h | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/glib/gatomic.h b/glib/gatomic.h
-index bb1435c70..e6eccfada 100644
---- a/glib/gatomic.h
-+++ b/glib/gatomic.h
-@@ -211,7 +211,7 @@ G_END_DECLS
- }))
- #define g_atomic_pointer_and(atomic, val) \
- (G_GNUC_EXTENSION ({ \
-- volatile gsize *gapa_atomic = (volatile gsize *) (atomic); \
-+ gsize *gapa_atomic = (gsize *) (atomic); \
- G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \
- G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gsize)); \
- (void) (0 ? (gpointer) *(atomic) : NULL); \
-@@ -220,7 +220,7 @@ G_END_DECLS
- }))
- #define g_atomic_pointer_or(atomic, val) \
- (G_GNUC_EXTENSION ({ \
-- volatile gsize *gapo_atomic = (volatile gsize *) (atomic); \
-+ gsize *gapo_atomic = (gsize *) (atomic); \
- G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \
- G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gsize)); \
- (void) (0 ? (gpointer) *(atomic) : NULL); \
-@@ -229,7 +229,7 @@ G_END_DECLS
- }))
- #define g_atomic_pointer_xor(atomic, val) \
- (G_GNUC_EXTENSION ({ \
-- volatile gsize *gapx_atomic = (volatile gsize *) (atomic); \
-+ gsize *gapx_atomic = (gsize *) (atomic); \
- G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \
- G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gsize)); \
- (void) (0 ? (gpointer) *(atomic) : NULL); \
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0015-glib-Drop-unnecessary-volatile-qualifiers-from-inter.patch b/meta/recipes-core/glib-2.0/glib-2.0/0015-glib-Drop-unnecessary-volatile-qualifiers-from-inter.patch
deleted file mode 100644
index 9468548e3a..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0015-glib-Drop-unnecessary-volatile-qualifiers-from-inter.patch
+++ /dev/null
@@ -1,169 +0,0 @@
-From 1314ff93fc4d3379483c33da6a7deff27f71ed95 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 18:40:56 +0000
-Subject: [PATCH 15/29] glib: Drop unnecessary volatile qualifiers from
- internal variables
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-These variables were already (correctly) accessed atomically. The
-`volatile` qualifier doesn’t help with that.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- glib/gdatetime.c | 2 +-
- glib/gkeyfile.c | 2 +-
- glib/gmain.c | 8 ++++----
- glib/gmarkup.c | 2 +-
- glib/gregex.c | 6 +++---
- glib/gthread.c | 6 +++---
- 6 files changed, 13 insertions(+), 13 deletions(-)
-
-diff --git a/glib/gdatetime.c b/glib/gdatetime.c
-index 1755257be..453077f6d 100644
---- a/glib/gdatetime.c
-+++ b/glib/gdatetime.c
-@@ -126,7 +126,7 @@ struct _GDateTime
- /* 1 is 0001-01-01 in Proleptic Gregorian */
- gint32 days;
-
-- volatile gint ref_count;
-+ gint ref_count; /* (atomic) */
- };
-
- /* Time conversion {{{1 */
-diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c
-index 9d0215331..bbe638b74 100644
---- a/glib/gkeyfile.c
-+++ b/glib/gkeyfile.c
-@@ -512,7 +512,7 @@ struct _GKeyFile
-
- gchar **locales;
-
-- volatile gint ref_count;
-+ gint ref_count; /* (atomic) */
- };
-
- typedef struct _GKeyFileKeyValuePair GKeyFileKeyValuePair;
-diff --git a/glib/gmain.c b/glib/gmain.c
-index 772b8ecfc..9c5f0ef1e 100644
---- a/glib/gmain.c
-+++ b/glib/gmain.c
-@@ -272,7 +272,7 @@ struct _GMainContext
- guint owner_count;
- GSList *waiters;
-
-- volatile gint ref_count;
-+ gint ref_count; /* (atomic) */
-
- GHashTable *sources; /* guint -> GSource */
-
-@@ -303,7 +303,7 @@ struct _GMainContext
-
- struct _GSourceCallback
- {
-- volatile gint ref_count;
-+ gint ref_count; /* (atomic) */
- GSourceFunc func;
- gpointer data;
- GDestroyNotify notify;
-@@ -313,7 +313,7 @@ struct _GMainLoop
- {
- GMainContext *context;
- gboolean is_running; /* (atomic) */
-- volatile gint ref_count;
-+ gint ref_count; /* (atomic) */
- };
-
- struct _GTimeoutSource
-@@ -4749,7 +4749,7 @@ g_main_context_get_poll_func (GMainContext *context)
- *
- * |[<!-- language="C" -->
- * #define NUM_TASKS 10
-- * static volatile gint tasks_remaining = NUM_TASKS;
-+ * static gint tasks_remaining = NUM_TASKS; // (atomic)
- * ...
- *
- * while (g_atomic_int_get (&tasks_remaining) != 0)
-diff --git a/glib/gmarkup.c b/glib/gmarkup.c
-index ba4dfd2e4..b8327fb6d 100644
---- a/glib/gmarkup.c
-+++ b/glib/gmarkup.c
-@@ -119,7 +119,7 @@ struct _GMarkupParseContext
- {
- const GMarkupParser *parser;
-
-- volatile gint ref_count;
-+ gint ref_count; /* (atomic) */
-
- GMarkupParseFlags flags;
-
-diff --git a/glib/gregex.c b/glib/gregex.c
-index 52416bbb9..5e6ddfb46 100644
---- a/glib/gregex.c
-+++ b/glib/gregex.c
-@@ -203,7 +203,7 @@ G_STATIC_ASSERT (G_REGEX_RAW == PCRE_UTF8);
-
- struct _GMatchInfo
- {
-- volatile gint ref_count; /* the ref count */
-+ gint ref_count; /* the ref count (atomic) */
- GRegex *regex; /* the regex */
- GRegexMatchFlags match_opts; /* options used at match time on the regex */
- gint matches; /* number of matching sub patterns */
-@@ -218,7 +218,7 @@ struct _GMatchInfo
-
- struct _GRegex
- {
-- volatile gint ref_count; /* the ref count for the immutable part */
-+ gint ref_count; /* the ref count for the immutable part (atomic) */
- gchar *pattern; /* the pattern */
- pcre *pcre_re; /* compiled form of the pattern */
- GRegexCompileFlags compile_opts; /* options used at compile time on the pattern */
-@@ -1300,7 +1300,7 @@ g_regex_new (const gchar *pattern,
- pcre *re;
- const gchar *errmsg;
- gboolean optimize = FALSE;
-- static volatile gsize initialised = 0;
-+ static gsize initialised = 0;
-
- g_return_val_if_fail (pattern != NULL, NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, NULL);
-diff --git a/glib/gthread.c b/glib/gthread.c
-index 53f3a0848..612a9739f 100644
---- a/glib/gthread.c
-+++ b/glib/gthread.c
-@@ -513,7 +513,7 @@ static GMutex g_once_mutex;
- static GCond g_once_cond;
- static GSList *g_once_init_list = NULL;
-
--static volatile guint g_thread_n_created_counter = 0;
-+static guint g_thread_n_created_counter = 0; /* (atomic) */
-
- static void g_thread_cleanup (gpointer data);
- static GPrivate g_thread_specific_private = G_PRIVATE_INIT (g_thread_cleanup);
-@@ -694,7 +694,7 @@ g_once_impl (GOnce *once,
- gboolean
- (g_once_init_enter) (volatile void *location)
- {
-- volatile gsize *value_location = location;
-+ gsize *value_location = (gsize *) location;
- gboolean need_init = FALSE;
- g_mutex_lock (&g_once_mutex);
- if (g_atomic_pointer_get (value_location) == 0)
-@@ -731,7 +731,7 @@ void
- (g_once_init_leave) (volatile void *location,
- gsize result)
- {
-- volatile gsize *value_location = location;
-+ gsize *value_location = (gsize *) location;
-
- g_return_if_fail (g_atomic_pointer_get (value_location) == 0);
- g_return_if_fail (result != 0);
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0016-gobject-Drop-unnecessary-volatile-qualifiers-from-in.patch b/meta/recipes-core/glib-2.0/glib-2.0/0016-gobject-Drop-unnecessary-volatile-qualifiers-from-in.patch
deleted file mode 100644
index 8111b3b51d..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0016-gobject-Drop-unnecessary-volatile-qualifiers-from-in.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From 08d04d0428cc26935a2d42083f1710432465c98a Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 18:42:43 +0000
-Subject: [PATCH 16/29] gobject: Drop unnecessary volatile qualifiers from
- internal variables
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-These variables were already (correctly) accessed atomically. The
-`volatile` qualifier doesn’t help with that.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- gobject/gclosure.c | 2 +-
- gobject/gclosure.h | 20 ++++++++++----------
- gobject/gobject.c | 4 ++--
- gobject/gtype.c | 10 +++++-----
- 4 files changed, 18 insertions(+), 18 deletions(-)
-
-diff --git a/gobject/gclosure.c b/gobject/gclosure.c
-index 1d1f2f48a..6d41e6d8a 100644
---- a/gobject/gclosure.c
-+++ b/gobject/gclosure.c
-@@ -98,7 +98,7 @@
-
- typedef union {
- GClosure closure;
-- volatile gint vint;
-+ gint vint;
- } ClosureInt;
-
- #define CHANGE_FIELD(_closure, _field, _OP, _value, _must_set, _SET_OLD, _SET_NEW) \
-diff --git a/gobject/gclosure.h b/gobject/gclosure.h
-index a0f91f538..884e403a8 100644
---- a/gobject/gclosure.h
-+++ b/gobject/gclosure.h
-@@ -175,20 +175,20 @@ struct _GClosureNotifyData
- struct _GClosure
- {
- /*< private >*/
-- volatile guint ref_count : 15;
-+ guint ref_count : 15; /* (atomic) */
- /* meta_marshal is not used anymore but must be zero for historical reasons
- as it was exposed in the G_CLOSURE_N_NOTIFIERS macro */
-- volatile guint meta_marshal_nouse : 1;
-- volatile guint n_guards : 1;
-- volatile guint n_fnotifiers : 2; /* finalization notifiers */
-- volatile guint n_inotifiers : 8; /* invalidation notifiers */
-- volatile guint in_inotify : 1;
-- volatile guint floating : 1;
-+ guint meta_marshal_nouse : 1; /* (atomic) */
-+ guint n_guards : 1; /* (atomic) */
-+ guint n_fnotifiers : 2; /* finalization notifiers (atomic) */
-+ guint n_inotifiers : 8; /* invalidation notifiers (atomic) */
-+ guint in_inotify : 1; /* (atomic) */
-+ guint floating : 1; /* (atomic) */
- /*< protected >*/
-- volatile guint derivative_flag : 1;
-+ guint derivative_flag : 1; /* (atomic) */
- /*< public >*/
-- volatile guint in_marshal : 1;
-- volatile guint is_invalid : 1;
-+ guint in_marshal : 1; /* (atomic) */
-+ guint is_invalid : 1; /* (atomic) */
-
- /*< private >*/ void (*marshal) (GClosure *closure,
- GValue /*out*/ *return_value,
-diff --git a/gobject/gobject.c b/gobject/gobject.c
-index 6e9c44a1e..a3a32be9f 100644
---- a/gobject/gobject.c
-+++ b/gobject/gobject.c
-@@ -174,9 +174,9 @@ typedef struct
- GTypeInstance g_type_instance;
-
- /*< private >*/
-- volatile guint ref_count;
-+ guint ref_count; /* (atomic) */
- #ifdef HAVE_OPTIONAL_FLAGS
-- volatile guint optional_flags;
-+ guint optional_flags; /* (atomic) */
- #endif
- GData *qdata;
- } GObjectReal;
-diff --git a/gobject/gtype.c b/gobject/gtype.c
-index 51dad7690..be5989a3e 100644
---- a/gobject/gtype.c
-+++ b/gobject/gtype.c
-@@ -221,9 +221,9 @@ typedef enum
- /* --- structures --- */
- struct _TypeNode
- {
-- guint volatile ref_count;
-+ guint ref_count; /* (atomic) */
- #ifdef G_ENABLE_DEBUG
-- guint volatile instance_count;
-+ guint instance_count; /* (atomic) */
- #endif
- GTypePlugin *plugin;
- guint n_children; /* writable with lock */
-@@ -233,7 +233,7 @@ struct _TypeNode
- guint is_instantiatable : 1;
- guint mutatable_check_cache : 1; /* combines some common path checks */
- GType *children; /* writable with lock */
-- TypeData * volatile data;
-+ TypeData *data;
- GQuark qname;
- GData *global_gdata;
- union {
-@@ -569,8 +569,8 @@ type_node_new_W (TypeNode *pnode,
- }
-
- static inline IFaceEntry*
--lookup_iface_entry_I (volatile IFaceEntries *entries,
-- TypeNode *iface_node)
-+lookup_iface_entry_I (IFaceEntries *entries,
-+ TypeNode *iface_node)
- {
- guint8 *offsets;
- guint offset_index;
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0017-gmessages-Drop-unnecessary-volatile-qualifiers-from-.patch b/meta/recipes-core/glib-2.0/glib-2.0/0017-gmessages-Drop-unnecessary-volatile-qualifiers-from-.patch
deleted file mode 100644
index 02816a887c..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0017-gmessages-Drop-unnecessary-volatile-qualifiers-from-.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From eee7e3c6688f2f1ee9beed5d6d209973c1df387e Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 19:14:25 +0000
-Subject: [PATCH 17/29] gmessages: Drop unnecessary volatile qualifiers from
- macro variables
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-It’s not necessary and provides no thread safety guarantees.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- glib/gmessages.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/glib/gmessages.h b/glib/gmessages.h
-index 6a28443b4..2e3650baf 100644
---- a/glib/gmessages.h
-+++ b/glib/gmessages.h
-@@ -478,7 +478,7 @@ g_debug (const gchar *format,
- #if defined(G_HAVE_ISO_VARARGS) && !G_ANALYZER_ANALYZING
- #define g_warning_once(...) \
- G_STMT_START { \
-- static volatile int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; \
-+ static int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; /* (atomic) */ \
- if (g_atomic_int_compare_and_exchange (&G_PASTE (_GWarningOnceBoolean, __LINE__), \
- 0, 1)) \
- g_warning (__VA_ARGS__); \
-@@ -487,7 +487,7 @@ g_debug (const gchar *format,
- #elif defined(G_HAVE_GNUC_VARARGS) && !G_ANALYZER_ANALYZING
- #define g_warning_once(format...) \
- G_STMT_START { \
-- static volatile int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; \
-+ static int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; /* (atomic) */ \
- if (g_atomic_int_compare_and_exchange (&G_PASTE (_GWarningOnceBoolean, __LINE__), \
- 0, 1)) \
- g_warning (format); \
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0018-gtypes-Drop-volatile-qualifier-from-gatomicrefcount.patch b/meta/recipes-core/glib-2.0/glib-2.0/0018-gtypes-Drop-volatile-qualifier-from-gatomicrefcount.patch
deleted file mode 100644
index 50cb3c470e..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0018-gtypes-Drop-volatile-qualifier-from-gatomicrefcount.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 8a87069ff42a0631dce153701cb2ec5e343a958c Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 19:16:30 +0000
-Subject: [PATCH 18/29] gtypes: Drop volatile qualifier from gatomicrefcount
-
-This is technically an API break, but since the type is meant to be
-opaque (third party code is not meant to treat it like an integer) it
-should not cause problems.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- glib/gtypes.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/glib/gtypes.h b/glib/gtypes.h
-index 23c5a1295..2c4825582 100644
---- a/glib/gtypes.h
-+++ b/glib/gtypes.h
-@@ -550,8 +550,8 @@ struct _GTimeVal
- glong tv_usec;
- } GLIB_DEPRECATED_TYPE_IN_2_62_FOR(GDateTime);
-
--typedef gint grefcount;
--typedef volatile gint gatomicrefcount;
-+typedef gint grefcount;
-+typedef gint gatomicrefcount; /* should be accessed only using atomics */
-
- G_END_DECLS
-
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0019-gatomicarray-Drop-volatile-qualifier-from-GAtomicArr.patch b/meta/recipes-core/glib-2.0/glib-2.0/0019-gatomicarray-Drop-volatile-qualifier-from-GAtomicArr.patch
deleted file mode 100644
index be3211664a..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0019-gatomicarray-Drop-volatile-qualifier-from-GAtomicArr.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 46bae4f18dfec8fedda82648091752d270b2dff8 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 19:19:20 +0000
-Subject: [PATCH 19/29] gatomicarray: Drop volatile qualifier from GAtomicArray
- API
-
-This is an API break, but it should not affect third party code since
-that code should not be interacting with the `data` member in a way that
-invokes its `volatile` qualifier (such as copying to an intermediate
-variable).
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- gobject/gatomicarray.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gobject/gatomicarray.h b/gobject/gatomicarray.h
-index 9550fa396..89043c5e4 100644
---- a/gobject/gatomicarray.h
-+++ b/gobject/gatomicarray.h
-@@ -29,7 +29,7 @@ G_BEGIN_DECLS
-
- typedef struct _GAtomicArray GAtomicArray;
- struct _GAtomicArray {
-- volatile gpointer data; /* elements - atomic */
-+ gpointer data; /* elements - atomic */
- };
-
- void _g_atomic_array_init (GAtomicArray *array);
-@@ -42,7 +42,7 @@ void _g_atomic_array_update (GAtomicArray *array,
- #define G_ATOMIC_ARRAY_GET_LOCKED(_array, _type) ((_type *)((_array)->data))
-
- #define G_ATOMIC_ARRAY_DO_TRANSACTION(_array, _type, _C_) G_STMT_START { \
-- volatile gpointer *_datap = &(_array)->data; \
-+ gpointer *_datap = &(_array)->data; \
- _type *transaction_data, *__check; \
- \
- __check = g_atomic_pointer_get (_datap); \
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0020-gobject-Drop-volatile-qualifier-from-GObject.ref_cou.patch b/meta/recipes-core/glib-2.0/glib-2.0/0020-gobject-Drop-volatile-qualifier-from-GObject.ref_cou.patch
deleted file mode 100644
index ae024a9af4..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0020-gobject-Drop-volatile-qualifier-from-GObject.ref_cou.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 334f6953364680ddc6c0d3da13fda1d92bf5379d Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 19:21:07 +0000
-Subject: [PATCH 20/29] gobject: Drop volatile qualifier from GObject.ref_count
-
-This is an API break, but no third party code should be touching
-`GObject.ref_count`, let alone in a way which would be changed by the
-removal of the `volatile` qualifier.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- gobject/gobject.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gobject/gobject.h b/gobject/gobject.h
-index 7f55e1976..a84c183f8 100644
---- a/gobject/gobject.h
-+++ b/gobject/gobject.h
-@@ -247,7 +247,7 @@ struct _GObject
- GTypeInstance g_type_instance;
-
- /*< private >*/
-- volatile guint ref_count;
-+ guint ref_count; /* (atomic) */
- GData *qdata;
- };
- /**
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0021-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch b/meta/recipes-core/glib-2.0/glib-2.0/0021-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch
deleted file mode 100644
index b8ed99ce15..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0021-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 8a112c3c6e5fe6838ee29eec7caa62ba32d9bc40 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 19:22:49 +0000
-Subject: [PATCH 21/29] tests: Drop unnecessary volatile qualifiers from tests
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-These variables were already (correctly) accessed atomically. The
-`volatile` qualifier doesn’t help with that.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- gobject/tests/qdata.c | 2 +-
- gobject/tests/threadtests.c | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/gobject/tests/qdata.c b/gobject/tests/qdata.c
-index 528bdc68e..7d46efb15 100644
---- a/gobject/tests/qdata.c
-+++ b/gobject/tests/qdata.c
-@@ -17,7 +17,7 @@ gboolean fail;
- #define ROUNDS 10000
-
- GObject *object;
--volatile gint bucket[THREADS];
-+gint bucket[THREADS]; /* accessed from multiple threads, but should never be contested due to the sequence of thread operations */
-
- static gpointer
- thread_func (gpointer data)
-diff --git a/gobject/tests/threadtests.c b/gobject/tests/threadtests.c
-index e341a9d67..b6f9e17fa 100644
---- a/gobject/tests/threadtests.c
-+++ b/gobject/tests/threadtests.c
-@@ -27,8 +27,8 @@
- #include <glib.h>
- #include <glib-object.h>
-
--static volatile int mtsafe_call_counter = 0; /* multi thread safe call counter */
--static int unsafe_call_counter = 0; /* single-threaded call counter */
-+static int mtsafe_call_counter = 0; /* multi thread safe call counter, must be accessed atomically */
-+static int unsafe_call_counter = 0; /* single-threaded call counter */
- static GCond sync_cond;
- static GMutex sync_mutex;
-
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0022-build-Drop-unnecessary-volatile-qualifiers-from-conf.patch b/meta/recipes-core/glib-2.0/glib-2.0/0022-build-Drop-unnecessary-volatile-qualifiers-from-conf.patch
deleted file mode 100644
index 5da509d178..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0022-build-Drop-unnecessary-volatile-qualifiers-from-conf.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From daf90bfa99fc02a253d538c65fbaa12f2e6c1c45 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 11 Nov 2020 19:23:18 +0000
-Subject: [PATCH 22/29] build: Drop unnecessary volatile qualifiers from
- configure tests
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- meson.build | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/meson.build b/meson.build
-index e0b308a25..ad7f887fb 100644
---- a/meson.build
-+++ b/meson.build
-@@ -1773,7 +1773,7 @@ endforeach
- # that then to silently fall back on emulated atomic ops just because
- # the user had the wrong build environment.
- atomictest = '''int main() {
-- volatile int atomic = 2;
-+ int atomic = 2;
- __sync_bool_compare_and_swap (&atomic, 2, 3);
- return 0;
- }
-@@ -1883,6 +1883,7 @@ endif
-
- # FIXME: we should make it print the result and always return 0, so that
- # the output in meson shows up as green
-+# volatile is needed here to avoid optimisations in the test
- stack_grows_check_prog = '''
- volatile int *a = 0, *b = 0;
- void f (int i) {
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0023-gdbusprivate-Avoid-a-warning-about-a-statement-with-.patch b/meta/recipes-core/glib-2.0/glib-2.0/0023-gdbusprivate-Avoid-a-warning-about-a-statement-with-.patch
deleted file mode 100644
index 012f9ca87a..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0023-gdbusprivate-Avoid-a-warning-about-a-statement-with-.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 0604f5858259c32744e6fc912ed4feb308651a3a Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Mon, 16 Nov 2020 14:47:23 +0000
-Subject: [PATCH 23/29] gdbusprivate: Avoid a warning about a statement with no
- effect
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- gio/gdbusprivate.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/gio/gdbusprivate.c b/gio/gdbusprivate.c
-index 99b37f3eb..4e42c1a4d 100644
---- a/gio/gdbusprivate.c
-+++ b/gio/gdbusprivate.c
-@@ -1945,11 +1945,10 @@ _g_dbus_initialize (void)
-
- if (g_once_init_enter (&initialized))
- {
-- GQuark g_dbus_error_domain;
- const gchar *debug;
-
-- g_dbus_error_domain = G_DBUS_ERROR;
-- (g_dbus_error_domain); /* To avoid -Wunused-but-set-variable */
-+ /* Ensure the domain is registered. */
-+ g_dbus_error_quark ();
-
- debug = g_getenv ("G_DBUS_DEBUG");
- if (debug != NULL)
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0024-tests-Add-comment-to-volatile-atomic-tests.patch b/meta/recipes-core/glib-2.0/glib-2.0/0024-tests-Add-comment-to-volatile-atomic-tests.patch
deleted file mode 100644
index 7350803c6f..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0024-tests-Add-comment-to-volatile-atomic-tests.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 2d03f99ae4de394cac0690717d96c2d884ccdae2 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Mon, 16 Nov 2020 14:47:47 +0000
-Subject: [PATCH 24/29] tests: Add comment to volatile atomic tests
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-`volatile` should not be used to indicate atomic variables, and we
-shouldn’t encourage its use. Keep the tests, since they check that we
-don’t emit warnings when built against incorrect old code which uses
-`volatile`. But add a comment to stop copy/paste use of `volatile`
-in the future.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- glib/tests/atomic.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/glib/tests/atomic.c b/glib/tests/atomic.c
-index 7d2459f3a..14e6e454e 100644
---- a/glib/tests/atomic.c
-+++ b/glib/tests/atomic.c
-@@ -94,6 +94,9 @@ test_types (void)
- res = g_atomic_pointer_compare_and_exchange (&vp_str, NULL, str);
- g_assert_true (res);
-
-+ /* Note that atomic variables should almost certainly not be marked as
-+ * `volatile` — see http://isvolatileusefulwiththreads.in/c/. This test exists
-+ * to make sure that we don’t warn when built against older third party code. */
- g_atomic_pointer_set (&vp_str_vol, NULL);
- res = g_atomic_pointer_compare_and_exchange (&vp_str_vol, NULL, str);
- g_assert_true (res);
-@@ -210,6 +213,9 @@ G_GNUC_END_IGNORE_DEPRECATIONS
- res = g_atomic_pointer_compare_and_exchange (&vp_str, NULL, (char *) str);
- g_assert_true (res);
-
-+ /* Note that atomic variables should almost certainly not be marked as
-+ * `volatile` — see http://isvolatileusefulwiththreads.in/c/. This test exists
-+ * to make sure that we don’t warn when built against older third party code. */
- g_atomic_pointer_set (&vp_str_vol, NULL);
- res = g_atomic_pointer_compare_and_exchange (&vp_str_vol, NULL, (char *) str);
- g_assert_true (res);
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0025-gthread-Use-g_atomic-primitives-correctly-in-destruc.patch b/meta/recipes-core/glib-2.0/glib-2.0/0025-gthread-Use-g_atomic-primitives-correctly-in-destruc.patch
deleted file mode 100644
index c15a3b8a57..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0025-gthread-Use-g_atomic-primitives-correctly-in-destruc.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 6bd0a4b29753570a2c20b61b5ad2c0068567b7b6 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Mon, 16 Nov 2020 16:44:29 +0000
-Subject: [PATCH 25/29] gthread: Use g_atomic() primitives correctly in
- destructor list
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-In the Windows destructor list, consistently access
-`g_private_destructors` using atomic primitives.
-
-`g_atomic_pointer_compare_and_exchange()` should be equivalent to
-`InterlockedCompareExchangePointer()`, but is a bit more understandable
-in a general GLib context, and pairs with `g_atomic_pointer_get()`. (I
-can’t find a Windows API equivalent for that.)
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- glib/gthread-win32.c | 13 +++++++------
- 1 file changed, 7 insertions(+), 6 deletions(-)
-
-diff --git a/glib/gthread-win32.c b/glib/gthread-win32.c
-index 0c37dc6c1..20aca6fa1 100644
---- a/glib/gthread-win32.c
-+++ b/glib/gthread-win32.c
-@@ -301,7 +301,7 @@ struct _GPrivateDestructor
- GPrivateDestructor *next;
- };
-
--static GPrivateDestructor * volatile g_private_destructors;
-+static GPrivateDestructor *g_private_destructors; /* (atomic) prepend-only */
- static CRITICAL_SECTION g_private_lock;
-
- static DWORD
-@@ -329,7 +329,7 @@ g_private_get_impl (GPrivate *key)
- g_thread_abort (errno, "malloc");
- destructor->index = impl;
- destructor->notify = key->notify;
-- destructor->next = g_private_destructors;
-+ destructor->next = g_atomic_pointer_get (&g_private_destructors);
-
- /* We need to do an atomic store due to the unlocked
- * access to the destructor list from the thread exit
-@@ -337,13 +337,14 @@ g_private_get_impl (GPrivate *key)
- *
- * It can double as a sanity check...
- */
-- if (InterlockedCompareExchangePointer (&g_private_destructors, destructor,
-- destructor->next) != destructor->next)
-+ if (!g_atomic_pointer_compare_and_exchange (&g_private_destructors,
-+ destructor->next,
-+ destructor))
- g_thread_abort (0, "g_private_get_impl(1)");
- }
-
- /* Ditto, due to the unlocked access on the fast path */
-- if (InterlockedCompareExchangePointer (&key->p, impl, NULL) != NULL)
-+ if (!g_atomic_pointer_compare_and_exchange (&key->p, NULL, impl))
- g_thread_abort (0, "g_private_get_impl(2)");
- }
- LeaveCriticalSection (&g_private_lock);
-@@ -635,7 +636,7 @@ g_thread_win32_thread_detach (void)
- */
- dtors_called = FALSE;
-
-- for (dtor = g_private_destructors; dtor; dtor = dtor->next)
-+ for (dtor = g_atomic_pointer_get (&g_private_destructors); dtor; dtor = dtor->next)
- {
- gpointer value;
-
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0026-gtype-Fix-some-typos-in-comments.patch b/meta/recipes-core/glib-2.0/glib-2.0/0026-gtype-Fix-some-typos-in-comments.patch
deleted file mode 100644
index 7090a12a8b..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0026-gtype-Fix-some-typos-in-comments.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 041dd8b70bd14b041d6a495492eb7a5fc7568bb7 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Mon, 16 Nov 2020 16:47:54 +0000
-Subject: [PATCH 26/29] gtype: Fix some typos in comments
-
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
----
- gobject/gtype.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/gobject/gtype.c b/gobject/gtype.c
-index be5989a3e..ae1af8a05 100644
---- a/gobject/gtype.c
-+++ b/gobject/gtype.c
-@@ -2290,7 +2290,7 @@ type_class_init_Wm (TypeNode *node,
- * inherited interfaces are already init_state == INITIALIZED, because
- * they either got setup in the above base_init loop, or during
- * class_init from within type_add_interface_Wm() for this or
-- * an anchestor type.
-+ * an ancestor type.
- */
- i = 0;
- while ((entries = CLASSED_NODE_IFACES_ENTRIES_LOCKED (node)) != NULL)
-@@ -3462,7 +3462,7 @@ g_type_depth (GType type)
- * be used to determine the types and order in which the leaf type is
- * descended from the root type.
- *
-- * Returns: immediate child of @root_type and anchestor of @leaf_type
-+ * Returns: immediate child of @root_type and ancestor of @leaf_type
- */
- GType
- g_type_next_base (GType type,
-@@ -3549,8 +3549,8 @@ type_node_conforms_to_U (TypeNode *node,
-
- /**
- * g_type_is_a:
-- * @type: type to check anchestry for
-- * @is_a_type: possible anchestor of @type or interface that @type
-+ * @type: type to check ancestry for
-+ * @is_a_type: possible ancestor of @type or interface that @type
- * could conform to
- *
- * If @is_a_type is a derivable type, check whether @type is a
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0027-gtype-Add-some-missing-atomic-accesses-to-init_state.patch b/meta/recipes-core/glib-2.0/glib-2.0/0027-gtype-Add-some-missing-atomic-accesses-to-init_state.patch
deleted file mode 100644
index 9c4e45ff41..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0027-gtype-Add-some-missing-atomic-accesses-to-init_state.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 47da8ec5d9a284e07f77c7d59fc8eacf3ebf188a Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Mon, 16 Nov 2020 16:57:22 +0000
-Subject: [PATCH 27/29] gtype: Add some missing atomic accesses to init_state
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Half of the references to `init_state` in `gtype.c` already correctly
-accessed it atomically, but a couple didn’t. Drop the `volatile`
-qualifier from its declaration, as that’s not necessary for atomic
-access.
-
-Note that this is the `init_state` in `TypeData`, *not* the `init_state`
-in `IFaceEntry`.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Helps: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- gobject/gtype.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/gobject/gtype.c b/gobject/gtype.c
-index ae1af8a05..909faf138 100644
---- a/gobject/gtype.c
-+++ b/gobject/gtype.c
-@@ -322,7 +322,7 @@ struct _ClassData
- CommonData common;
- guint16 class_size;
- guint16 class_private_size;
-- int volatile init_state; /* atomic - g_type_class_ref reads it unlocked */
-+ int init_state; /* (atomic) - g_type_class_ref reads it unlocked */
- GBaseInitFunc class_init_base;
- GBaseFinalizeFunc class_finalize_base;
- GClassInitFunc class_init;
-@@ -336,7 +336,7 @@ struct _InstanceData
- CommonData common;
- guint16 class_size;
- guint16 class_private_size;
-- int volatile init_state; /* atomic - g_type_class_ref reads it unlocked */
-+ int init_state; /* (atomic) - g_type_class_ref reads it unlocked */
- GBaseInitFunc class_init_base;
- GBaseFinalizeFunc class_finalize_base;
- GClassInitFunc class_init;
-@@ -1415,7 +1415,7 @@ type_node_add_iface_entry_W (TypeNode *node,
-
- if (parent_entry)
- {
-- if (node->data && node->data->class.init_state >= BASE_IFACE_INIT)
-+ if (node->data && g_atomic_int_get (&node->data->class.init_state) >= BASE_IFACE_INIT)
- {
- entries->entry[i].init_state = INITIALIZED;
- entries->entry[i].vtable = parent_entry->vtable;
-@@ -1481,7 +1481,7 @@ type_add_interface_Wm (TypeNode *node,
- */
- if (node->data)
- {
-- InitState class_state = node->data->class.init_state;
-+ InitState class_state = g_atomic_int_get (&node->data->class.init_state);
-
- if (class_state >= BASE_IFACE_INIT)
- type_iface_vtable_base_init_Wm (iface, node);
-@@ -2175,7 +2175,7 @@ type_class_init_Wm (TypeNode *node,
- g_assert (node->is_classed && node->data &&
- node->data->class.class_size &&
- !node->data->class.class &&
-- node->data->class.init_state == UNINITIALIZED);
-+ g_atomic_int_get (&node->data->class.init_state) == UNINITIALIZED);
- if (node->data->class.class_private_size)
- class = g_malloc0 (ALIGN_STRUCT (node->data->class.class_size) + node->data->class.class_private_size);
- else
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0028-gresource-Fix-a-pointer-mismatch-with-an-atomic-load.patch b/meta/recipes-core/glib-2.0/glib-2.0/0028-gresource-Fix-a-pointer-mismatch-with-an-atomic-load.patch
deleted file mode 100644
index e03fac19f4..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0028-gresource-Fix-a-pointer-mismatch-with-an-atomic-load.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 7d417f8406b8fa32a25659120738d22be6a1b482 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Mon, 16 Nov 2020 17:17:21 +0000
-Subject: [PATCH 28/29] gresource: Fix a pointer mismatch with an atomic load
-
-This squashes a warning when compiling with Clang.
-
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
----
- gio/gresource.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gio/gresource.c b/gio/gresource.c
-index 79a49d33d..b495d12ac 100644
---- a/gio/gresource.c
-+++ b/gio/gresource.c
-@@ -1398,7 +1398,7 @@ register_lazy_static_resources (void)
- void
- g_static_resource_init (GStaticResource *static_resource)
- {
-- gpointer next;
-+ GStaticResource *next;
-
- do
- {
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0029-docs-Document-not-to-use-volatile-qualifiers.patch b/meta/recipes-core/glib-2.0/glib-2.0/0029-docs-Document-not-to-use-volatile-qualifiers.patch
deleted file mode 100644
index 3311ad65d6..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0029-docs-Document-not-to-use-volatile-qualifiers.patch
+++ /dev/null
@@ -1,258 +0,0 @@
-From 83e48d8ac1fee98059e2305d8909dca26190bddc Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Tue, 17 Nov 2020 10:15:15 +0000
-Subject: [PATCH 29/29] docs: Document not to use `volatile` qualifiers
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Fixes: #600
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
----
- gio/gdbusconnection.c | 12 ++++++++---
- gio/gdbuserror.c | 3 +++
- glib/gatomic.c | 48 +++++++++++++++++++++++++++++++++++++++++++
- glib/gthread.c | 6 ++++++
- 4 files changed, 66 insertions(+), 3 deletions(-)
-
-diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
-index 91c365e80..65939a4d2 100644
---- a/gio/gdbusconnection.c
-+++ b/gio/gdbusconnection.c
-@@ -1708,7 +1708,9 @@ g_dbus_connection_send_message_unlocked (GDBusConnection *connection,
- * will be assigned by @connection and set on @message via
- * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
- * serial number used will be written to this location prior to
-- * submitting the message to the underlying transport.
-+ * submitting the message to the underlying transport. While it has a `volatile`
-+ * qualifier, this is a historical artifact and the argument passed to it should
-+ * not be `volatile`.
- *
- * If @connection is closed then the operation will fail with
- * %G_IO_ERROR_CLOSED. If @message is not well-formed,
-@@ -1979,7 +1981,9 @@ g_dbus_connection_send_message_with_reply_unlocked (GDBusConnection *connect
- * will be assigned by @connection and set on @message via
- * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
- * serial number used will be written to this location prior to
-- * submitting the message to the underlying transport.
-+ * submitting the message to the underlying transport. While it has a `volatile`
-+ * qualifier, this is a historical artifact and the argument passed to it should
-+ * not be `volatile`.
- *
- * If @connection is closed then the operation will fail with
- * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
-@@ -2105,7 +2109,9 @@ send_message_with_reply_sync_cb (GDBusConnection *connection,
- * will be assigned by @connection and set on @message via
- * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
- * serial number used will be written to this location prior to
-- * submitting the message to the underlying transport.
-+ * submitting the message to the underlying transport. While it has a `volatile`
-+ * qualifier, this is a historical artifact and the argument passed to it should
-+ * not be `volatile`.
- *
- * If @connection is closed then the operation will fail with
- * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
-diff --git a/gio/gdbuserror.c b/gio/gdbuserror.c
-index b03a33f27..4ad97bb6e 100644
---- a/gio/gdbuserror.c
-+++ b/gio/gdbuserror.c
-@@ -177,6 +177,9 @@ g_dbus_error_quark (void)
- *
- * Helper function for associating a #GError error domain with D-Bus error names.
- *
-+ * While @quark_volatile has a `volatile` qualifier, this is a historical
-+ * artifact and the argument passed to it should not be `volatile`.
-+ *
- * Since: 2.26
- */
- void
-diff --git a/glib/gatomic.c b/glib/gatomic.c
-index 67f5ba6b4..0bc67aa35 100644
---- a/glib/gatomic.c
-+++ b/glib/gatomic.c
-@@ -105,6 +105,9 @@
- * This call acts as a full compiler and hardware
- * memory barrier (before the get).
- *
-+ * While @atomic has a `volatile` qualifier, this is a historical artifact and
-+ * the pointer passed to it should not be `volatile`.
-+ *
- * Returns: the value of the integer
- *
- * Since: 2.4
-@@ -125,6 +128,9 @@ gint
- * This call acts as a full compiler and hardware
- * memory barrier (after the set).
- *
-+ * While @atomic has a `volatile` qualifier, this is a historical artifact and
-+ * the pointer passed to it should not be `volatile`.
-+ *
- * Since: 2.4
- */
- void
-@@ -144,6 +150,9 @@ void
- *
- * This call acts as a full compiler and hardware memory barrier.
- *
-+ * While @atomic has a `volatile` qualifier, this is a historical artifact and
-+ * the pointer passed to it should not be `volatile`.
-+ *
- * Since: 2.4
- **/
- void
-@@ -163,6 +172,9 @@ void
- *
- * This call acts as a full compiler and hardware memory barrier.
- *
-+ * While @atomic has a `volatile` qualifier, this is a historical artifact and
-+ * the pointer passed to it should not be `volatile`.
-+ *
- * Returns: %TRUE if the resultant value is zero
- *
- * Since: 2.4
-@@ -189,6 +201,9 @@ gboolean
- *
- * This call acts as a full compiler and hardware memory barrier.
- *
-+ * While @atomic has a `volatile` qualifier, this is a historical artifact and
-+ * the pointer passed to it should not be `volatile`.
-+ *
- * Returns: %TRUE if the exchange took place
- *
- * Since: 2.4
-@@ -216,6 +231,9 @@ gboolean
- * Before version 2.30, this function did not return a value
- * (but g_atomic_int_exchange_and_add() did, and had the same meaning).
- *
-+ * While @atomic has a `volatile` qualifier, this is a historical artifact and
-+ * the pointer passed to it should not be `volatile`.
-+ *
- * Returns: the value of @atomic before the add, signed
- *
- * Since: 2.4
-@@ -240,6 +258,9 @@ gint
- * Think of this operation as an atomic version of
- * `{ tmp = *atomic; *atomic &= val; return tmp; }`.
- *
-+ * While @atomic has a `volatile` qualifier, this is a historical artifact and
-+ * the pointer passed to it should not be `volatile`.
-+ *
- * Returns: the value of @atomic before the operation, unsigned
- *
- * Since: 2.30
-@@ -264,6 +285,9 @@ guint
- *
- * This call acts as a full compiler and hardware memory barrier.
- *
-+ * While @atomic has a `volatile` qualifier, this is a historical artifact and
-+ * the pointer passed to it should not be `volatile`.
-+ *
- * Returns: the value of @atomic before the operation, unsigned
- *
- * Since: 2.30
-@@ -288,6 +312,9 @@ guint
- *
- * This call acts as a full compiler and hardware memory barrier.
- *
-+ * While @atomic has a `volatile` qualifier, this is a historical artifact and
-+ * the pointer passed to it should not be `volatile`.
-+ *
- * Returns: the value of @atomic before the operation, unsigned
- *
- * Since: 2.30
-@@ -309,6 +336,9 @@ guint
- * This call acts as a full compiler and hardware
- * memory barrier (before the get).
- *
-+ * While @atomic has a `volatile` qualifier, this is a historical artifact and
-+ * the pointer passed to it should not be `volatile`.
-+ *
- * Returns: the value of the pointer
- *
- * Since: 2.4
-@@ -329,6 +359,9 @@ gpointer
- * This call acts as a full compiler and hardware
- * memory barrier (after the set).
- *
-+ * While @atomic has a `volatile` qualifier, this is a historical artifact and
-+ * the pointer passed to it should not be `volatile`.
-+ *
- * Since: 2.4
- **/
- void
-@@ -354,6 +387,9 @@ void
- *
- * This call acts as a full compiler and hardware memory barrier.
- *
-+ * While @atomic has a `volatile` qualifier, this is a historical artifact and
-+ * the pointer passed to it should not be `volatile`.
-+ *
- * Returns: %TRUE if the exchange took place
- *
- * Since: 2.4
-@@ -379,6 +415,9 @@ gboolean
- *
- * This call acts as a full compiler and hardware memory barrier.
- *
-+ * While @atomic has a `volatile` qualifier, this is a historical artifact and
-+ * the pointer passed to it should not be `volatile`.
-+ *
- * Returns: the value of @atomic before the add, signed
- *
- * Since: 2.30
-@@ -403,6 +442,9 @@ gssize
- *
- * This call acts as a full compiler and hardware memory barrier.
- *
-+ * While @atomic has a `volatile` qualifier, this is a historical artifact and
-+ * the pointer passed to it should not be `volatile`.
-+ *
- * Returns: the value of @atomic before the operation, unsigned
- *
- * Since: 2.30
-@@ -427,6 +469,9 @@ gsize
- *
- * This call acts as a full compiler and hardware memory barrier.
- *
-+ * While @atomic has a `volatile` qualifier, this is a historical artifact and
-+ * the pointer passed to it should not be `volatile`.
-+ *
- * Returns: the value of @atomic before the operation, unsigned
- *
- * Since: 2.30
-@@ -451,6 +496,9 @@ gsize
- *
- * This call acts as a full compiler and hardware memory barrier.
- *
-+ * While @atomic has a `volatile` qualifier, this is a historical artifact and
-+ * the pointer passed to it should not be `volatile`.
-+ *
- * Returns: the value of @atomic before the operation, unsigned
- *
- * Since: 2.30
-diff --git a/glib/gthread.c b/glib/gthread.c
-index 612a9739f..29216d7fd 100644
---- a/glib/gthread.c
-+++ b/glib/gthread.c
-@@ -686,6 +686,9 @@ g_once_impl (GOnce *once,
- * // use initialization_value here
- * ]|
- *
-+ * While @location has a `volatile` qualifier, this is a historical artifact and
-+ * the pointer passed to it should not be `volatile`.
-+ *
- * Returns: %TRUE if the initialization section should be entered,
- * %FALSE and blocks otherwise
- *
-@@ -725,6 +728,9 @@ gboolean
- * releases concurrent threads blocking in g_once_init_enter() on this
- * initialization variable.
- *
-+ * While @location has a `volatile` qualifier, this is a historical artifact and
-+ * the pointer passed to it should not be `volatile`.
-+ *
- * Since: 2.14
- */
- void
---
-2.30.1
-
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch b/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
deleted file mode 100644
index 41ecfa1df8..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From 7cde170afe6854d674b50e32b4c1d3b511be9abe Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Mon, 9 Nov 2015 11:07:27 +0200
-Subject: [PATCH] Enable more tests while cross-compiling
-
-Upstream disables a few tests while cross-compiling because their build requires
-running other built binaries. This usually makes sense but in the cross-compile
-case we can depend on glib-2.0-native.
-
-Upstream-Status: Inappropriate [OE specific]
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-
----
- gio/tests/meson.build | 24 ++++++++++++------------
- 1 file changed, 12 insertions(+), 12 deletions(-)
-
-diff --git a/gio/tests/meson.build b/gio/tests/meson.build
-index 788cf97..dab65d2 100644
---- a/gio/tests/meson.build
-+++ b/gio/tests/meson.build
-@@ -203,7 +203,7 @@ if host_machine.system() != 'windows'
-
- # Test programs that need to bring up a session bus (requires dbus-daemon)
- have_dbus_daemon = find_program('dbus-daemon', required : false).found()
-- if have_dbus_daemon
-+ if true
- annotate_args = [
- '--annotate', 'org.project.Bar', 'Key1', 'Value1',
- '--annotate', 'org.project.Bar', 'org.gtk.GDBus.Internal', 'Value2',
-@@ -548,12 +548,12 @@ if installed_tests_enabled
- endforeach
- endif
-
--if not meson.is_cross_build() or meson.has_exe_wrapper()
-+if meson.is_cross_build()
-
- plugin_resources_c = custom_target('plugin-resources.c',
- input : 'test4.gresource.xml',
- output : 'plugin-resources.c',
-- command : [glib_compile_resources,
-+ command : ['glib-compile-resources',
- '--target=@OUTPUT@',
- '--sourcedir=' + meson.current_source_dir(),
- '--generate-source',
-@@ -577,7 +577,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
- test_gresource = custom_target('test.gresource',
- input : 'test.gresource.xml',
- output : 'test.gresource',
-- command : [glib_compile_resources,
-+ command : ['glib-compile-resources',
- '--target=@OUTPUT@',
- '--sourcedir=' + meson.current_source_dir(),
- '--sourcedir=' + meson.current_build_dir(),
-@@ -588,7 +588,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
- test_resources2_c = custom_target('test_resources2.c',
- input : 'test3.gresource.xml',
- output : 'test_resources2.c',
-- command : [glib_compile_resources,
-+ command : ['glib-compile-resources',
- '--target=@OUTPUT@',
- '--sourcedir=' + meson.current_source_dir(),
- '--generate',
-@@ -599,7 +599,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
- test_resources2_h = custom_target('test_resources2.h',
- input : 'test3.gresource.xml',
- output : 'test_resources2.h',
-- command : [glib_compile_resources,
-+ command : ['glib-compile-resources',
- '--target=@OUTPUT@',
- '--sourcedir=' + meson.current_source_dir(),
- '--generate',
-@@ -611,7 +611,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
- input : 'test2.gresource.xml',
- depends : big_test_resource,
- output : 'test_resources.c',
-- command : [glib_compile_resources,
-+ command : ['glib-compile-resources',
- '--target=@OUTPUT@',
- '--sourcedir=' + meson.current_source_dir(),
- '--sourcedir=' + meson.current_build_dir(),
-@@ -622,7 +622,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
- digit_test_resources_c = custom_target('digit_test_resources.c',
- input : '111_digit_test.gresource.xml',
- output : 'digit_test_resources.c',
-- command : [glib_compile_resources,
-+ command : ['glib-compile-resources',
- '--target=@OUTPUT@',
- '--sourcedir=' + meson.current_source_dir(),
- '--sourcedir=' + meson.current_build_dir(),
-@@ -633,7 +633,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
- digit_test_resources_h = custom_target('digit_test_resources.h',
- input : '111_digit_test.gresource.xml',
- output : 'digit_test_resources.h',
-- command : [glib_compile_resources,
-+ command : ['glib-compile-resources',
- '--target=@OUTPUT@',
- '--sourcedir=' + meson.current_source_dir(),
- '--generate',
-@@ -668,11 +668,11 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
-
- ld = find_program('ld', required : false)
-
-- if build_machine.system() == 'linux' and cc.get_id() == 'gcc' and objcopy.found() and objcopy_supports_add_symbol and ld.found()
-+ if not meson.is_cross_build()
- test_gresource_binary = custom_target('test5.gresource',
- input : 'test5.gresource.xml',
- output : 'test5.gresource',
-- command : [glib_compile_resources,
-+ command : ['glib-compile-resources',
- '--target=@OUTPUT@',
- '--sourcedir=' + meson.current_source_dir(),
- '--sourcedir=' + meson.current_build_dir(),
-@@ -684,7 +684,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
- test_resources_binary_c = custom_target('test_resources_binary.c',
- input : 'test5.gresource.xml',
- output : 'test_resources_binary.c',
-- command : [glib_compile_resources,
-+ command : ['glib-compile-resources',
- '--target=@OUTPUT@',
- '--sourcedir=' + meson.current_source_dir(),
- '--sourcedir=' + meson.current_build_dir(),
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch b/meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch
new file mode 100644
index 0000000000..bdfbd55899
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch
@@ -0,0 +1,54 @@
+From cce3ae98a2c1966719daabff5a4ec6cf94a846f6 Mon Sep 17 00:00:00 2001
+From: Philip Withnall <pwithnall@gnome.org>
+Date: Mon, 26 Feb 2024 16:55:44 +0000
+Subject: [PATCH] tests: Remove variable-length lookbehind tests for GRegex
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+PCRE2 10.43 has now introduced support for variable-length lookbehind,
+so these tests now fail if GLib is built against PCRE2 10.43 or higher.
+
+See
+https://github.com/PCRE2Project/pcre2/blob/e8db6fa7137f4c6f66cb87e0a3c9467252ec1ef7/ChangeLog#L94.
+
+Rather than making the tests conditional on the version of PCRE2 in use,
+just remove them. They are mostly testing the PCRE2 code rather than
+any code in GLib, so don’t have much value.
+
+This should fix CI runs on msys2-mingw32, which updated to PCRE2 10.43 2
+days ago.
+
+Signed-off-by: Philip Withnall <pwithnall@gnome.org>
+
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/cce3ae98a2c1966719daabff5a4ec6cf94a846f6]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ glib/tests/regex.c | 10 ----------
+ 1 file changed, 10 deletions(-)
+
+diff --git a/glib/tests/regex.c b/glib/tests/regex.c
+index 1082526292..d7a698ec67 100644
+--- a/glib/tests/regex.c
++++ b/glib/tests/regex.c
+@@ -1885,16 +1885,6 @@ test_lookbehind (void)
+ g_match_info_free (match);
+ g_regex_unref (regex);
+
+- regex = g_regex_new ("(?<!dogs?|cats?) x", G_REGEX_OPTIMIZE, G_REGEX_MATCH_DEFAULT, &error);
+- g_assert (regex == NULL);
+- g_assert_error (error, G_REGEX_ERROR, G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND);
+- g_clear_error (&error);
+-
+- regex = g_regex_new ("(?<=ab(c|de)) foo", G_REGEX_OPTIMIZE, G_REGEX_MATCH_DEFAULT, &error);
+- g_assert (regex == NULL);
+- g_assert_error (error, G_REGEX_ERROR, G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND);
+- g_clear_error (&error);
+-
+ regex = g_regex_new ("(?<=abc|abde)foo", G_REGEX_OPTIMIZE, G_REGEX_MATCH_DEFAULT, &error);
+ g_assert (regex);
+ g_assert_no_error (error);
+--
+GitLab
+
+
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/memory-monitor.patch b/meta/recipes-core/glib-2.0/glib-2.0/memory-monitor.patch
new file mode 100644
index 0000000000..4f38509da6
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/memory-monitor.patch
@@ -0,0 +1,361 @@
+From ce840b6b111e1e109e511f6833d6aa419e2b723a Mon Sep 17 00:00:00 2001
+From: Philip Withnall <philip@tecnocode.co.uk>
+Date: Tue, 23 Jan 2024 11:16:52 +0000
+Subject: [PATCH] Merge branch '2887-memory-monitor-tests' into 'main'
+
+tests: Fix race condition in memory-monitor-dbus.test
+
+Closes #2887
+
+See merge request GNOME/glib!3844
+
+Hopefully these commits fix the occasional failures we've been seeing:
+https://bugzilla.yoctoproject.org/show_bug.cgi?id=15362
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+---
+ gio/tests/memory-monitor-dbus.py.in | 64 +++++++++++++-------
+ gio/tests/memory-monitor-portal.py.in | 54 ++++++++++-------
+ gio/tests/power-profile-monitor-dbus.py.in | 35 ++++++-----
+ gio/tests/power-profile-monitor-portal.py.in | 34 ++++++-----
+ 4 files changed, 113 insertions(+), 74 deletions(-)
+
+diff --git a/gio/tests/memory-monitor-dbus.py.in b/gio/tests/memory-monitor-dbus.py.in
+index bf32918..7aae01e 100755
+--- a/gio/tests/memory-monitor-dbus.py.in
++++ b/gio/tests/memory-monitor-dbus.py.in
+@@ -16,7 +16,6 @@ import sys
+ import subprocess
+ import fcntl
+ import os
+-import time
+
+ import taptestrunner
+
+@@ -57,53 +56,74 @@ try:
+ fcntl.fcntl(self.p_mock.stdout, fcntl.F_SETFL, flags | os.O_NONBLOCK)
+ self.last_warning = -1
+ self.dbusmock = dbus.Interface(self.obj_lmm, dbusmock.MOCK_IFACE)
++
++ try:
++ self.wait_for_bus_object('org.freedesktop.LowMemoryMonitor',
++ '/org/freedesktop/LowMemoryMonitor',
++ system_bus=True)
++ except:
++ raise
++
+ self.memory_monitor = Gio.MemoryMonitor.dup_default()
++ assert("GMemoryMonitorDBus" in str(self.memory_monitor))
+ self.memory_monitor.connect("low-memory-warning", self.memory_warning_cb)
+ self.mainloop = GLib.MainLoop()
+ self.main_context = self.mainloop.get_context()
+
++ # The LowMemoryMonitor API is stateless: it doesn’t expose any
++ # properties, just a warning signal. Emit the signal in a loop until
++ # the GMemoryMonitor instance has initialised and synchronised to
++ # the right state.
++ def emit_warning(level):
++ self.dbusmock.EmitWarning(level)
++ return GLib.SOURCE_CONTINUE
++
++ idle_id = GLib.idle_add(emit_warning, 0)
++ while self.last_warning != 0:
++ self.main_context.iteration(True)
++ GLib.source_remove(idle_id)
++
+ def tearDown(self):
+ self.p_mock.terminate()
+ self.p_mock.wait()
+
+- def assertEventually(self, condition, message=None, timeout=50):
++ def assertEventually(self, condition, message=None, timeout=5):
+ '''Assert that condition function eventually returns True.
+
+- Timeout is in deciseconds, defaulting to 50 (5 seconds). message is
++ Timeout is in seconds, defaulting to 5 seconds. message is
+ printed on failure.
+ '''
+- while timeout >= 0:
+- context = GLib.MainContext.default()
+- while context.iteration(False):
+- pass
+- if condition():
+- break
+- timeout -= 1
+- time.sleep(0.1)
+- else:
+- self.fail(message or 'timed out waiting for ' + str(condition))
++ if not message:
++ message = 'timed out waiting for ' + str(condition)
++
++ def timed_out_cb(message):
++ self.fail(message)
++ return GLib.SOURCE_REMOVE
++
++ timeout_source = GLib.timeout_source_new_seconds(timeout)
++ timeout_source.set_callback(timed_out_cb, message)
++ timeout_source.attach(self.main_context)
++
++ while not condition():
++ self.main_context.iteration(True)
++
++ timeout_source.destroy()
+
+ def memory_warning_cb(self, monitor, level):
++ print("Received memory warning signal, level", level)
+ self.last_warning = level
+ self.main_context.wakeup()
+
+ def test_low_memory_warning_signal(self):
+ '''LowMemoryWarning signal'''
+
+- # Wait 2 seconds
+- timeout = 2
+- while timeout > 0:
+- time.sleep(0.5)
+- timeout -= 0.5
+- self.main_context.iteration(False)
+-
+ self.dbusmock.EmitWarning(100)
+ # Wait 2 seconds or until warning
+- self.assertEventually(lambda: self.last_warning == 100, "'100' low-memory warning not received", 20)
++ self.assertEventually(lambda: self.last_warning == 100, "'100' low-memory warning not received", 2)
+
+ self.dbusmock.EmitWarning(255)
+ # Wait 2 seconds or until warning
+- self.assertEventually(lambda: self.last_warning == 255, "'255' low-memory warning not received", 20)
++ self.assertEventually(lambda: self.last_warning == 255, "'255' low-memory warning not received", 2)
+
+ except ImportError as e:
+ @unittest.skip("Cannot import %s" % e.name)
+diff --git a/gio/tests/memory-monitor-portal.py.in b/gio/tests/memory-monitor-portal.py.in
+index 748cee8..f570508 100755
+--- a/gio/tests/memory-monitor-portal.py.in
++++ b/gio/tests/memory-monitor-portal.py.in
+@@ -16,7 +16,6 @@ import sys
+ import subprocess
+ import fcntl
+ import os
+-import time
+
+ import taptestrunner
+
+@@ -80,26 +79,44 @@ try:
+ self.mainloop = GLib.MainLoop()
+ self.main_context = self.mainloop.get_context()
+
++ # The LowMemoryMonitor API is stateless: it doesn’t expose any
++ # properties, just a warning signal. Emit the signal in a loop until
++ # the GMemoryMonitor instance has initialised and synchronised to
++ # the right state.
++ def emit_warning(level):
++ self.dbusmock.EmitWarning(level)
++ return GLib.SOURCE_CONTINUE
++
++ idle_id = GLib.idle_add(self.emit_warning, 0)
++ while self.last_warning != 0:
++ self.main_context.iteration(True)
++ GLib.source_remove(idle_id)
++
+ def tearDown(self):
+ self.p_mock.terminate()
+ self.p_mock.wait()
+
+- def assertEventually(self, condition, message=None, timeout=50):
++ def assertEventually(self, condition, message=None, timeout=5):
+ '''Assert that condition function eventually returns True.
+
+- Timeout is in deciseconds, defaulting to 50 (5 seconds). message is
++ Timeout is in seconds, defaulting to 5 seconds. message is
+ printed on failure.
+ '''
+- while timeout >= 0:
+- context = GLib.MainContext.default()
+- while context.iteration(False):
+- pass
+- if condition():
+- break
+- timeout -= 1
+- time.sleep(0.1)
+- else:
+- self.fail(message or 'timed out waiting for ' + str(condition))
++ if not message:
++ message = 'timed out waiting for ' + str(condition)
++
++ def timed_out_cb(message):
++ self.fail(message)
++ return GLib.SOURCE_REMOVE
++
++ timeout_source = GLib.timeout_source_new_seconds(timeout)
++ timeout_source.set_callback(timed_out_cb, message)
++ timeout_source.attach(self.main_context)
++
++ while not condition():
++ self.main_context.iteration(True)
++
++ timeout_source.destroy()
+
+ def portal_memory_warning_cb(self, monitor, level):
+ self.last_warning = level
+@@ -108,20 +125,13 @@ try:
+ def test_low_memory_warning_portal_signal(self):
+ '''LowMemoryWarning signal'''
+
+- # Wait 2 seconds
+- timeout = 2
+- while timeout > 0:
+- time.sleep(0.5)
+- timeout -= 0.5
+- self.main_context.iteration(False)
+-
+ self.dbusmock.EmitWarning(100)
+ # Wait 2 seconds or until warning
+- self.assertEventually(lambda: self.last_warning == 100, "'100' low-memory warning not received", 20)
++ self.assertEventually(lambda: self.last_warning == 100, "'100' low-memory warning not received", 2)
+
+ self.dbusmock.EmitWarning(255)
+ # Wait 2 seconds or until warning
+- self.assertEventually(lambda: self.last_warning == 255, "'255' low-memory warning not received", 20)
++ self.assertEventually(lambda: self.last_warning == 255, "'255' low-memory warning not received", 2)
+
+ except ImportError as e:
+ @unittest.skip("Cannot import %s" % e.name)
+diff --git a/gio/tests/power-profile-monitor-dbus.py.in b/gio/tests/power-profile-monitor-dbus.py.in
+index 06e594f..f955afc 100755
+--- a/gio/tests/power-profile-monitor-dbus.py.in
++++ b/gio/tests/power-profile-monitor-dbus.py.in
+@@ -16,7 +16,6 @@ import sys
+ import subprocess
+ import fcntl
+ import os
+-import time
+
+ import taptestrunner
+
+@@ -58,6 +57,7 @@ try:
+ self.power_saver_enabled = False
+ self.dbus_props = dbus.Interface(self.obj_ppd, dbus.PROPERTIES_IFACE)
+ self.power_profile_monitor = Gio.PowerProfileMonitor.dup_default()
++ assert("GPowerProfileMonitorDBus" in str(self.power_profile_monitor))
+ self.power_profile_monitor.connect("notify::power-saver-enabled", self.power_saver_enabled_cb)
+ self.mainloop = GLib.MainLoop()
+ self.main_context = self.mainloop.get_context()
+@@ -66,22 +66,27 @@ try:
+ self.p_mock.terminate()
+ self.p_mock.wait()
+
+- def assertEventually(self, condition, message=None, timeout=50):
++ def assertEventually(self, condition, message=None, timeout=5):
+ '''Assert that condition function eventually returns True.
+
+- Timeout is in deciseconds, defaulting to 50 (5 seconds). message is
++ Timeout is in seconds, defaulting to 5 seconds. message is
+ printed on failure.
+ '''
+- while timeout >= 0:
+- context = GLib.MainContext.default()
+- while context.iteration(False):
+- pass
+- if condition():
+- break
+- timeout -= 1
+- time.sleep(0.1)
+- else:
+- self.fail(message or 'timed out waiting for ' + str(condition))
++ if not message:
++ message = 'timed out waiting for ' + str(condition)
++
++ def timed_out_cb(message):
++ self.fail(message)
++ return GLib.SOURCE_REMOVE
++
++ timeout_source = GLib.timeout_source_new_seconds(timeout)
++ timeout_source.set_callback(timed_out_cb, message)
++ timeout_source.attach(self.main_context)
++
++ while not condition():
++ self.main_context.iteration(True)
++
++ timeout_source.destroy()
+
+ def power_saver_enabled_cb(self, spec, data):
+ self.power_saver_enabled = self.power_profile_monitor.get_power_saver_enabled()
+@@ -92,10 +97,10 @@ try:
+
+ self.assertEqual(self.power_profile_monitor.get_power_saver_enabled(), False)
+ self.dbus_props.Set('net.hadess.PowerProfiles', 'ActiveProfile', dbus.String('power-saver', variant_level=1))
+- self.assertEventually(lambda: self.power_saver_enabled == True, "power-saver didn't become enabled", 10)
++ self.assertEventually(lambda: self.power_saver_enabled == True, "power-saver didn't become enabled", 1)
+
+ self.dbus_props.Set('net.hadess.PowerProfiles', 'ActiveProfile', dbus.String('balanced', variant_level=1))
+- self.assertEventually(lambda: self.power_saver_enabled == False, "power-saver didn't become disabled", 10)
++ self.assertEventually(lambda: self.power_saver_enabled == False, "power-saver didn't become disabled", 1)
+
+ except ImportError as e:
+ @unittest.skip("Cannot import %s" % e.name)
+diff --git a/gio/tests/power-profile-monitor-portal.py.in b/gio/tests/power-profile-monitor-portal.py.in
+index 09e9a45..ad2abf6 100755
+--- a/gio/tests/power-profile-monitor-portal.py.in
++++ b/gio/tests/power-profile-monitor-portal.py.in
+@@ -16,7 +16,6 @@ import sys
+ import subprocess
+ import fcntl
+ import os
+-import time
+
+ import taptestrunner
+
+@@ -90,22 +89,27 @@ try:
+ self.p_mock.terminate()
+ self.p_mock.wait()
+
+- def assertEventually(self, condition, message=None, timeout=50):
++ def assertEventually(self, condition, message=None, timeout=5):
+ '''Assert that condition function eventually returns True.
+
+- Timeout is in deciseconds, defaulting to 50 (5 seconds). message is
++ Timeout is in seconds, defaulting to 5 seconds. message is
+ printed on failure.
+ '''
+- while timeout >= 0:
+- context = GLib.MainContext.default()
+- while context.iteration(False):
+- pass
+- if condition():
+- break
+- timeout -= 1
+- time.sleep(0.1)
+- else:
+- self.fail(message or 'timed out waiting for ' + str(condition))
++ if not message:
++ message = 'timed out waiting for ' + str(condition)
++
++ def timed_out_cb(message):
++ self.fail(message)
++ return GLib.SOURCE_REMOVE
++
++ timeout_source = GLib.timeout_source_new_seconds(timeout)
++ timeout_source.set_callback(timed_out_cb, message)
++ timeout_source.attach(self.main_context)
++
++ while not condition():
++ self.main_context.iteration(True)
++
++ timeout_source.destroy()
+
+ def power_saver_enabled_cb(self, spec, data):
+ self.power_saver_enabled = self.power_profile_monitor.get_power_saver_enabled()
+@@ -116,10 +120,10 @@ try:
+
+ self.assertEqual(self.power_profile_monitor.get_power_saver_enabled(), False)
+ self.dbus_props.Set('net.hadess.PowerProfiles', 'ActiveProfile', dbus.String('power-saver', variant_level=1))
+- self.assertEventually(lambda: self.power_saver_enabled == True, "power-saver didn't become enabled", 10)
++ self.assertEventually(lambda: self.power_saver_enabled == True, "power-saver didn't become enabled", 1)
+
+ self.dbus_props.Set('net.hadess.PowerProfiles', 'ActiveProfile', dbus.String('balanced', variant_level=1))
+- self.assertEventually(lambda: self.power_saver_enabled == False, "power-saver didn't become disabled", 10)
++ self.assertEventually(lambda: self.power_saver_enabled == False, "power-saver didn't become disabled", 1)
+
+ def test_power_profile_power_saver_enabled_portal_default(self):
+ '''power-saver-enabled property default value'''
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc b/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc
index c4648f58c7..3049e5116e 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc
+++ b/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc
@@ -3,3 +3,4 @@ have_c99_vsnprintf = true
have_c99_snprintf = true
have_unix98_printf = true
va_val_copy = true
+have_strlcpy = true
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch b/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
index 4cbcc29a50..3e79bbf679 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
@@ -1,4 +1,4 @@
-From 011c9f024b6475d31e7d5432a38d00fb67eaea40 Mon Sep 17 00:00:00 2001
+From f40e89b3852df37959606ee13b1a14ade81fa886 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@intel.com>
Date: Fri, 11 Mar 2016 15:35:55 +0000
Subject: [PATCH] glib-2.0: relocate the GIO module directory for native builds
@@ -13,38 +13,32 @@ Signed-off-by: Ross Burton <ross.burton@intel.com>
Port patch to 2.48
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-
---
- gio/giomodule.c | 12 +++++++++++-
- 1 file changed, 11 insertions(+), 1 deletion(-)
+ gio/giomodule.c | 7 -------
+ 1 file changed, 7 deletions(-)
diff --git a/gio/giomodule.c b/gio/giomodule.c
-index dc4d6d3..da46906 100644
+index 17fabe6..8021208 100644
--- a/gio/giomodule.c
+++ b/gio/giomodule.c
-@@ -49,6 +49,8 @@
- #include "gmemorymonitordbus.h"
- #ifdef G_OS_WIN32
- #include "gregistrysettingsbackend.h"
-+#else
-+#include <dlfcn.h>
- #endif
- #include <glib/gstdio.h>
-
-@@ -1163,7 +1165,15 @@ get_gio_module_dir (void)
- NULL);
+@@ -1271,11 +1271,6 @@ get_gio_module_dir (void)
g_free (install_dir);
#else
-- module_dir = g_strdup (GIO_MODULE_DIR);
-+ Dl_info info;
-+
-+ if (dladdr (g_io_module_new, &info)) {
-+ char *libdir = g_path_get_dirname (info.dli_fname);
-+ module_dir = g_build_filename (libdir, "gio", "modules", NULL);
-+ g_free (libdir);
-+ } else {
-+ module_dir = g_strdup (GIO_MODULE_DIR);
-+ }
+ module_dir = g_strdup (GIO_MODULE_DIR);
+-#ifdef __APPLE__
+-#include "TargetConditionals.h"
+-/* Only auto-relocate on macOS, not watchOS etc; older macOS SDKs only define TARGET_OS_MAC */
+-#if (defined (TARGET_OS_OSX) && TARGET_OS_OSX) || \
+- (!defined (TARGET_OS_OSX) && defined (TARGET_OS_MAC) && TARGET_OS_MAC)
+ #include <dlfcn.h>
+ {
+ g_autofree gchar *path = NULL;
+@@ -1294,8 +1289,6 @@ get_gio_module_dir (void)
+ }
+ }
+ }
+-#endif
+-#endif
#endif
}
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
index 7a231b514b..831bc3b91f 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
+++ b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
@@ -5,5 +5,6 @@ if id -u glib2-test; then
userdel glib2-test
fi
useradd glib2-test
-su glib2-test -c 'gnome-desktop-testing-runner glib'
+cd /tmp
+su glib2-test -c 'G_TEST_TMPDIR=`readlink -f /tmp` gnome-desktop-testing-runner glib'
userdel glib2-test
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/skip-timeout.patch b/meta/recipes-core/glib-2.0/glib-2.0/skip-timeout.patch
new file mode 100644
index 0000000000..cd5ac287c3
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/skip-timeout.patch
@@ -0,0 +1,32 @@
+From bb11d1a4ae77d93ec0743e54077cf0f990243fa6 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@arm.com>
+Date: Thu, 28 Mar 2024 16:27:09 +0000
+Subject: [PATCH] Skip /timeout/rounding test
+
+This test is sensitive to load because it expects certain timeout operations
+to succeed in specific time periods. Whilst these timeouts are fairly large,
+they're still exceeded inside a qemu on a loaded system.
+
+https://bugzilla.yoctoproject.org/show_bug.cgi?id=14464
+
+Upstream-Status: Inappropriate [OE-specific]
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+---
+ glib/tests/timeout.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/glib/tests/timeout.c b/glib/tests/timeout.c
+index 1ae3f3a34..85a715b0f 100644
+--- a/glib/tests/timeout.c
++++ b/glib/tests/timeout.c
+@@ -214,7 +214,6 @@ main (int argc, char *argv[])
+ g_test_add_func ("/timeout/seconds-once", test_seconds_once);
+ g_test_add_func ("/timeout/weeks-overflow", test_weeks_overflow);
+ g_test_add_func ("/timeout/far-future-ready-time", test_far_future_ready_time);
+- g_test_add_func ("/timeout/rounding", test_rounding);
+
+ return g_test_run ();
+ }
+--
+2.34.1
+