summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-core/glib-2.0
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2020-04-13 21:39:40 +0300
committerAndrew Geissler <geissonator@yahoo.com>2020-05-05 16:30:44 +0300
commit82c905dc58a36aeae40b1b273a12f63fb1973cf4 (patch)
tree38caf00263451b5036435cdc36e035b25d32e623 /poky/meta/recipes-core/glib-2.0
parent83ecb75644b3d677c274188f9ac0b2374d6f6925 (diff)
downloadopenbmc-82c905dc58a36aeae40b1b273a12f63fb1973cf4.tar.xz
meta-openembedded and poky: subtree updates
Squash of the following due to dependencies among them and OpenBMC changes: meta-openembedded: subtree update:d0748372d2..9201611135 meta-openembedded: subtree update:9201611135..17fd382f34 poky: subtree update:9052e5b32a..2e11d97b6c poky: subtree update:2e11d97b6c..a8544811d7 The change log was too large for the jenkins plugin to handle therefore it has been removed. Here is the first and last commit of each subtree: meta-openembedded:d0748372d2 cppzmq: bump to version 4.6.0 meta-openembedded:17fd382f34 mpv: Remove X11 dependency poky:9052e5b32a package_ipk: Remove pointless comment to trigger rebuild poky:a8544811d7 pbzip2: Fix license warning Change-Id: If0fc6c37629642ee207a4ca2f7aa501a2c673cd6 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'poky/meta/recipes-core/glib-2.0')
-rw-r--r--poky/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch27
-rw-r--r--poky/meta/recipes-core/glib-2.0/glib-2.0/0011-GMainContext-Fix-GSource-iterator-if-iteration-can-m.patch43
-rw-r--r--poky/meta/recipes-core/glib-2.0/glib-2.0/0012-GMainContext-Fix-memory-leaks-and-memory-corruption-.patch109
-rw-r--r--poky/meta/recipes-core/glib-2.0/glib-2.0/0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch36
-rw-r--r--poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch36
-rw-r--r--poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common3
-rw-r--r--poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc (renamed from poky/meta/recipes-core/glib-2.0/glib-2.0/glib-meson.cross)4
-rw-r--r--poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux5
-rw-r--r--poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-mingw6
-rw-r--r--poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-musl6
-rw-r--r--poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch2
-rw-r--r--poky/meta/recipes-core/glib-2.0/glib-2.0/run-ptest3
-rw-r--r--poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.2.bb24
-rw-r--r--poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb53
-rw-r--r--poky/meta/recipes-core/glib-2.0/glib.inc18
15 files changed, 322 insertions, 53 deletions
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch
new file mode 100644
index 000000000..3dfef176f
--- /dev/null
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch
@@ -0,0 +1,27 @@
+From 730803f2bc3f2f1a74f4db809a224066e7eae114 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
+
+This test requires building resources in a way that is
+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
+--- a/gio/tests/resources.c
++++ b/gio/tests/resources.c
+@@ -993,7 +993,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);
+- g_test_add_func ("/resource/binary-linked", test_resource_binary_linked);
++ /* g_test_add_func ("/resource/binary-linked", test_resource_binary_linked); */
+ #endif
+ g_test_add_func ("/resource/uri/query-info", test_uri_query_info);
+ g_test_add_func ("/resource/uri/file", test_uri_file);
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0011-GMainContext-Fix-GSource-iterator-if-iteration-can-m.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0011-GMainContext-Fix-GSource-iterator-if-iteration-can-m.patch
new file mode 100644
index 000000000..37b77d567
--- /dev/null
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/0011-GMainContext-Fix-GSource-iterator-if-iteration-can-m.patch
@@ -0,0 +1,43 @@
+From ef2be42998e3fc10299055a5a01f7c791538174c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
+Date: Mon, 3 Feb 2020 15:38:28 +0200
+Subject: [PATCH] GMainContext - Fix GSource iterator if iteration can modify
+ the list
+
+We first have to ref the next source and then unref the previous one.
+This might be the last reference to the previous source, and freeing the
+previous source might unref and free the next one which would then leave
+use with a dangling pointer here.
+
+Fixes https://gitlab.gnome.org/GNOME/glib/issues/2031
+
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/b06c48de7554607ff3fb58d6c0510cfa5088e909]
+
+---
+ glib/gmain.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/glib/gmain.c b/glib/gmain.c
+index af979c8..a9a287d 100644
+--- a/glib/gmain.c
++++ b/glib/gmain.c
+@@ -969,13 +969,17 @@ g_source_iter_next (GSourceIter *iter, GSource **source)
+ * GSourceList to be removed from source_lists (if iter->source is
+ * the only source in its list, and it is destroyed), so we have to
+ * keep it reffed until after we advance iter->current_list, above.
++ *
++ * Also we first have to ref the next source before unreffing the
++ * previous one as unreffing the previous source can potentially
++ * free the next one.
+ */
++ if (next_source && iter->may_modify)
++ g_source_ref (next_source);
+
+ if (iter->source && iter->may_modify)
+ g_source_unref_internal (iter->source, iter->context, TRUE);
+ iter->source = next_source;
+- if (iter->source && iter->may_modify)
+- g_source_ref (iter->source);
+
+ *source = iter->source;
+ return *source != NULL;
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0012-GMainContext-Fix-memory-leaks-and-memory-corruption-.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0012-GMainContext-Fix-memory-leaks-and-memory-corruption-.patch
new file mode 100644
index 000000000..cf97d9d3d
--- /dev/null
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/0012-GMainContext-Fix-memory-leaks-and-memory-corruption-.patch
@@ -0,0 +1,109 @@
+From 611430a32a46d0dc806a829161e2dccf9c0196a8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
+Date: Mon, 3 Feb 2020 15:35:51 +0200
+Subject: [PATCH] GMainContext - Fix memory leaks and memory corruption when
+ freeing sources while freeing a context
+
+Instead of destroying sources directly while freeing the context, and
+potentially freeing them if this was the last reference to them, collect
+new references of all sources in a separate list before and at the same
+time invalidate their context so that they can't access it anymore. Only
+once all sources have their context invalidated, destroy them while
+still keeping a reference to them. Once all sources are destroyed we get
+rid of the additional references and free them if nothing else keeps a
+reference to them anymore.
+
+This fixes a regression introduced by 26056558be in 2012.
+
+The previous code that invalidated the context of each source and then
+destroyed it before going to the next source without keeping an
+additional reference caused memory leaks or memory corruption depending
+on the order of the sources in the sources lists.
+
+If a source was destroyed it might happen that this was the last
+reference to this source, and it would then be freed. This would cause
+the finalize function to be called, which might destroy and unref
+another source and potentially free it. This other source would then
+either
+- go through the normal free logic and change the intern linked list
+ between the sources, while other sources that are unreffed as part of
+ the main context freeing would not. As such the list would be in an
+ inconsistent state and we might dereference freed memory.
+- go through the normal destroy and free logic but because the context
+ pointer was already invalidated it would simply mark the source as
+ destroyed without actually removing it from the context. This would
+ then cause a memory leak because the reference owned by the context is
+ not freed.
+
+Fixes https://github.com/gtk-rs/glib/issues/583 while still keeping
+https://bugzilla.gnome.org/show_bug.cgi?id=661767 fixes.
+
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/aa20167d419c649f34fed06a9463890b41b1eba0]
+
+---
+ glib/gmain.c | 35 ++++++++++++++++++++++++++++++++++-
+ 1 file changed, 34 insertions(+), 1 deletion(-)
+
+diff --git a/glib/gmain.c b/glib/gmain.c
+index a9a287d..10ba2f8 100644
+--- a/glib/gmain.c
++++ b/glib/gmain.c
+@@ -538,6 +538,7 @@ g_main_context_unref (GMainContext *context)
+ GSourceIter iter;
+ GSource *source;
+ GList *sl_iter;
++ GSList *s_iter, *remaining_sources = NULL;
+ GSourceList *list;
+ guint i;
+
+@@ -557,10 +558,30 @@ g_main_context_unref (GMainContext *context)
+
+ /* g_source_iter_next() assumes the context is locked. */
+ LOCK_CONTEXT (context);
+- g_source_iter_init (&iter, context, TRUE);
++
++ /* First collect all remaining sources from the sources lists and store a
++ * new reference in a separate list. Also set the context of the sources
++ * to NULL so that they can't access a partially destroyed context anymore.
++ *
++ * We have to do this first so that we have a strong reference to all
++ * sources and destroying them below does not also free them, and so that
++ * none of the sources can access the context from their finalize/dispose
++ * functions. */
++ g_source_iter_init (&iter, context, FALSE);
+ while (g_source_iter_next (&iter, &source))
+ {
+ source->context = NULL;
++ remaining_sources = g_slist_prepend (remaining_sources, g_source_ref (source));
++ }
++ g_source_iter_clear (&iter);
++
++ /* Next destroy all sources. As we still hold a reference to all of them,
++ * this won't cause any of them to be freed yet and especially prevents any
++ * source that unrefs another source from its finalize function to be freed.
++ */
++ for (s_iter = remaining_sources; s_iter; s_iter = s_iter->next)
++ {
++ source = s_iter->data;
+ g_source_destroy_internal (source, context, TRUE);
+ }
+ UNLOCK_CONTEXT (context);
+@@ -585,6 +606,18 @@ g_main_context_unref (GMainContext *context)
+ g_cond_clear (&context->cond);
+
+ g_free (context);
++
++ /* And now finally get rid of our references to the sources. This will cause
++ * them to be freed unless something else still has a reference to them. Due
++ * to setting the context pointers in the sources to NULL above, this won't
++ * ever access the context or the internal linked list inside the GSource.
++ * We already removed the sources completely from the context above. */
++ for (s_iter = remaining_sources; s_iter; s_iter = s_iter->next)
++ {
++ source = s_iter->data;
++ g_source_unref_internal (source, NULL, FALSE);
++ }
++ g_slist_free (remaining_sources);
+ }
+
+ /* Helper function used by mainloop/overflow test.
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch
new file mode 100644
index 000000000..4c9e9f518
--- /dev/null
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch
@@ -0,0 +1,36 @@
+From 3e9d85f1b75e2b1096d9643563d7d17380752fc7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
+Date: Tue, 11 Feb 2020 09:34:38 +0200
+Subject: [PATCH] GMainContext - Move mutex unlocking in destructor right
+ before freeing the mutex
+
+This does not have any behaviour changes but is cleaner. The mutex is
+only unlocked now after all operations on the context are done and right
+before freeing the mutex and the context itself.
+
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/730a75fc8e8271c38fbd5363d1f77a00876b9ddc]
+
+---
+ glib/gmain.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/glib/gmain.c b/glib/gmain.c
+index 10ba2f8..b1df470 100644
+--- a/glib/gmain.c
++++ b/glib/gmain.c
+@@ -584,7 +584,6 @@ g_main_context_unref (GMainContext *context)
+ source = s_iter->data;
+ g_source_destroy_internal (source, context, TRUE);
+ }
+- UNLOCK_CONTEXT (context);
+
+ for (sl_iter = context->source_lists; sl_iter; sl_iter = sl_iter->next)
+ {
+@@ -595,6 +594,7 @@ g_main_context_unref (GMainContext *context)
+
+ g_hash_table_destroy (context->sources);
+
++ UNLOCK_CONTEXT (context);
+ g_mutex_clear (&context->mutex);
+
+ g_ptr_array_free (context->pending_dispatches, TRUE);
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
index ff2629f06..48899ce85 100644
--- a/poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
@@ -1,4 +1,4 @@
-From 23cd157352ac8a53f992ddc6d6d01caadf1c79bc Mon Sep 17 00:00:00 2001
+From 0061d66057dfd7e7267772df60b36474fb180eed 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
@@ -11,14 +11,14 @@ Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
- gio/tests/meson.build | 26 ++++++++++++++------------
- 1 file changed, 14 insertions(+), 12 deletions(-)
+ 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 65f43e2..028b196 100644
+index 382dfcc..c171717 100644
--- a/gio/tests/meson.build
+++ b/gio/tests/meson.build
-@@ -185,7 +185,7 @@ if host_machine.system() != 'windows'
+@@ -191,7 +191,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()
@@ -27,12 +27,11 @@ index 65f43e2..028b196 100644
annotate_args = [
'--annotate', 'org.project.Bar', 'Key1', 'Value1',
'--annotate', 'org.project.Bar', 'org.gtk.GDBus.Internal', 'Value2',
-@@ -453,12 +453,13 @@ if installed_tests_enabled
+@@ -465,12 +465,12 @@ if installed_tests_enabled
install_data('static-link.py', install_dir : installed_tests_execdir)
endif
-if not meson.is_cross_build() or meson.has_exe_wrapper()
-+#if not meson.is_cross_build() or meson.has_exe_wrapper()
+if meson.is_cross_build()
plugin_resources_c = custom_target('plugin-resources.c',
@@ -43,7 +42,7 @@ index 65f43e2..028b196 100644
'--target=@OUTPUT@',
'--sourcedir=' + meson.current_source_dir(),
'--generate-source',
-@@ -482,7 +483,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
+@@ -494,7 +494,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',
@@ -52,7 +51,7 @@ index 65f43e2..028b196 100644
'--target=@OUTPUT@',
'--sourcedir=' + meson.current_source_dir(),
'--sourcedir=' + meson.current_build_dir(),
-@@ -493,7 +494,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
+@@ -505,7 +505,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',
@@ -61,7 +60,7 @@ index 65f43e2..028b196 100644
'--target=@OUTPUT@',
'--sourcedir=' + meson.current_source_dir(),
'--generate',
-@@ -504,7 +505,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
+@@ -516,7 +516,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',
@@ -70,7 +69,7 @@ index 65f43e2..028b196 100644
'--target=@OUTPUT@',
'--sourcedir=' + meson.current_source_dir(),
'--generate',
-@@ -516,7 +517,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
+@@ -528,7 +528,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
input : 'test2.gresource.xml',
depends : big_test_resource,
output : 'test_resources.c',
@@ -79,7 +78,7 @@ index 65f43e2..028b196 100644
'--target=@OUTPUT@',
'--sourcedir=' + meson.current_source_dir(),
'--sourcedir=' + meson.current_build_dir(),
-@@ -527,7 +528,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
+@@ -539,7 +539,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',
@@ -88,7 +87,7 @@ index 65f43e2..028b196 100644
'--target=@OUTPUT@',
'--sourcedir=' + meson.current_source_dir(),
'--sourcedir=' + meson.current_build_dir(),
-@@ -538,7 +539,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
+@@ -550,7 +550,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',
@@ -97,12 +96,11 @@ index 65f43e2..028b196 100644
'--target=@OUTPUT@',
'--sourcedir=' + meson.current_source_dir(),
'--generate',
-@@ -565,11 +566,12 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
- # Support for --add-symbol was added to LLVM objcopy in 2019
- # (https://reviews.llvm.org/D58234). FIXME: This test could be enabled for
+@@ -579,11 +579,11 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
# LLVM once that support is in a stable release.
-- if build_machine.system() == 'linux' and cc.get_id() == 'gcc'
-+ #if build_machine.system() == 'linux' and cc.get_id() == 'gcc'
+ objcopy = find_program('objcopy', required : false)
+
+- if build_machine.system() == 'linux' and cc.get_id() == 'gcc' and objcopy.found()
+ if not meson.is_cross_build()
test_gresource_binary = custom_target('test5.gresource',
input : 'test5.gresource.xml',
@@ -112,7 +110,7 @@ index 65f43e2..028b196 100644
'--target=@OUTPUT@',
'--sourcedir=' + meson.current_source_dir(),
'--sourcedir=' + meson.current_build_dir(),
-@@ -581,7 +583,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
+@@ -595,7 +595,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',
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common b/poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common
new file mode 100644
index 000000000..0d7c5fa3f
--- /dev/null
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common
@@ -0,0 +1,3 @@
+[properties]
+# On all known supported architectures the stack grows down
+growing_stack = false
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/glib-meson.cross b/poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc
index b5df40072..c4648f58c 100644
--- a/poky/meta/recipes-core/glib-2.0/glib-2.0/glib-meson.cross
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc
@@ -3,7 +3,3 @@ have_c99_vsnprintf = true
have_c99_snprintf = true
have_unix98_printf = true
va_val_copy = true
-growing_stack = false
-
-[binaries]
-env = "/usr/bin/env"
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux b/poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux
new file mode 100644
index 000000000..83596e0ef
--- /dev/null
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux
@@ -0,0 +1,5 @@
+[properties]
+have_proc_self_cmdline = true
+
+[binaries]
+env = "/usr/bin/env"
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-mingw b/poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-mingw
new file mode 100644
index 000000000..75f911ba1
--- /dev/null
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-mingw
@@ -0,0 +1,6 @@
+[properties]
+have_c99_vsnprintf = false
+have_c99_snprintf = false
+have_unix98_printf = false
+va_val_copy = true
+have_proc_self_cmdline = false
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-musl b/poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-musl
new file mode 100644
index 000000000..3049e5116
--- /dev/null
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-musl
@@ -0,0 +1,6 @@
+[properties]
+have_c99_vsnprintf = true
+have_c99_snprintf = true
+have_unix98_printf = true
+va_val_copy = true
+have_strlcpy = true
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
index 7e9925845..fc320dcab 100644
--- a/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
@@ -1,4 +1,4 @@
-From 6325bf4e8a2f569c55c8e1a36b9439d3566f98f6 Mon Sep 17 00:00:00 2001
+From 8c623acdbea3ecc2812bbaafcfc892758fa978da 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
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/run-ptest b/poky/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
index fc50082c8..7a231b514 100644
--- a/poky/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
@@ -1,6 +1,9 @@
#! /bin/sh
set -eux
+if id -u glib2-test; then
+ userdel glib2-test
+fi
useradd glib2-test
su glib2-test -c 'gnome-desktop-testing-runner glib'
userdel glib2-test
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.2.bb b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.2.bb
deleted file mode 100644
index 27a15a9b1..000000000
--- a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.2.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-require glib.inc
-
-PE = "1"
-
-SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
- file://run-ptest \
- file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \
- file://Enable-more-tests-while-cross-compiling.patch \
- file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
- file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
- file://0001-Do-not-ignore-return-value-of-write.patch \
- file://0010-Do-not-hardcode-python-path-into-various-tools.patch \
- file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \
- file://0001-Do-not-write-bindir-into-pkg-config-files.patch \
- file://0001-meson-Run-atomics-test-on-clang-as-well.patch \
- "
-
-SRC_URI_append_class-native = " file://relocate-modules.patch"
-SRC_URI_append_class-target = " file://glib-meson.cross"
-
-SRC_URI[md5sum] = "bed3a70397a019965efac0c49f9c8164"
-SRC_URI[sha256sum] = "698824a413f76df039739c2a78f45b10939d526ae7495bab4e694e6730deb3f1"
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb
new file mode 100644
index 000000000..d49623500
--- /dev/null
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb
@@ -0,0 +1,53 @@
+require glib.inc
+
+PE = "1"
+
+SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
+ file://run-ptest \
+ file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \
+ file://Enable-more-tests-while-cross-compiling.patch \
+ file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
+ file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
+ file://0001-Do-not-ignore-return-value-of-write.patch \
+ file://0010-Do-not-hardcode-python-path-into-various-tools.patch \
+ file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \
+ file://0001-Do-not-write-bindir-into-pkg-config-files.patch \
+ file://0001-meson-Run-atomics-test-on-clang-as-well.patch \
+ file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \
+ file://0011-GMainContext-Fix-GSource-iterator-if-iteration-can-m.patch \
+ file://0012-GMainContext-Fix-memory-leaks-and-memory-corruption-.patch \
+ file://0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch \
+ "
+
+SRC_URI_append_class-native = " file://relocate-modules.patch"
+
+SRC_URI[md5sum] = "d52234ecba128932bed90bbc3553bfe5"
+SRC_URI[sha256sum] = "4c84030d77fa9712135dfa8036ad663925655ae95b1d19399b6200e869925bbc"
+
+# Find any meson cross files in FILESPATH that are relevant for the current
+# build (using siteinfo) and add them to EXTRA_OEMESON.
+inherit siteinfo
+def find_meson_cross_files(d):
+ if bb.data.inherits_class('native', d):
+ return ""
+
+ corebase = d.getVar("COREBASE")
+ import collections
+ sitedata = siteinfo_data(d)
+ # filename -> found
+ files = collections.OrderedDict()
+ for path in d.getVar("FILESPATH").split(":"):
+ for element in sitedata:
+ filename = os.path.normpath(os.path.join(path, "meson.cross.d", element))
+ files[filename.replace(corebase, "${COREBASE}")] = os.path.exists(filename)
+
+ items = ["--cross-file=" + k for k,v in files.items() if v]
+ d.appendVar("EXTRA_OEMESON", " " + " ".join(items))
+ items = ["%s:%s" % (k, "True" if v else "False") for k,v in files.items()]
+ d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(items))
+
+python () {
+ find_meson_cross_files(d)
+}
diff --git a/poky/meta/recipes-core/glib-2.0/glib.inc b/poky/meta/recipes-core/glib-2.0/glib.inc
index e811b42d7..7ebed0e5f 100644
--- a/poky/meta/recipes-core/glib-2.0/glib.inc
+++ b/poky/meta/recipes-core/glib-2.0/glib.inc
@@ -49,7 +49,6 @@ PACKAGECONFIG[libelf] = ",,elfutils"
PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false,dbus"
EXTRA_OEMESON = "-Ddtrace=false -Dfam=false -Dsystemtap=false -Dselinux=disabled"
-EXTRA_OEMESON_append_class-target = " --cross-file ${WORKDIR}/glib-meson.cross"
do_configure_prepend() {
sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
@@ -59,13 +58,15 @@ FILES_${PN} = "${libdir}/lib*${SOLIBS} \
${libdir}/gio \
${libexecdir}/*gio-querymodules \
${datadir}/glib-2.0/schemas"
+
+FILES_${PN}-utils += "${bindir}/glib-genmarshal \
+ ${bindir}/glib-gettextize \
+ ${bindir}/glib-mkenums \
+ ${bindir}/glib-compile-resources"
+
FILES_${PN}-dev += "${libdir}/glib-2.0/include \
${libdir}/gio/modules/lib*${SOLIBSDEV} \
${libdir}/gio/modules/*.la \
- ${bindir}/glib-genmarshal \
- ${bindir}/glib-gettextize \
- ${bindir}/glib-mkenums \
- ${bindir}/glib-compile-resources \
${datadir}/glib-2.0/gettext/po/Makefile.in.in \
${datadir}/glib-2.0/schemas/gschema.dtd \
${datadir}/glib-2.0/valgrind/glib.supp \
@@ -127,6 +128,11 @@ do_install_append_class-target () {
rm ${D}${datadir}/installed-tests/glib/gdbus-serialization.test
fi
fi
+ if [ -f ${D}${datadir}/installed-tests/glib/static-link.test ]; then
+ if test "x${MLPREFIX}" != "x"; then
+ mv ${D}${datadir}/installed-tests/glib/static-link.test ${D}${datadir}/installed-tests/glib/${MLPREFIX}static-link.test
+ fi
+ fi
}
# As we do not build python3 for windows, makes no sense to ship the script that's using it
@@ -139,6 +145,8 @@ CODEGEN_PYTHON_RDEPENDS_mingw32 = ""
RDEPENDS_${PN}-codegen += "${CODEGEN_PYTHON_RDEPENDS}"
+RDEPENDS_${PN}-ptest += "${PN}-utils"
+
RDEPENDS_${PN}-ptest += "\
coreutils \
libgcc \