* [Buildroot] [PATCH 1/3] libglib2: rename patches
@ 2013-05-14 11:57 Samuel Martin
2013-05-14 11:57 ` [Buildroot] [PATCH 2/3] libglib2: fix build when toolchain has no thread support Samuel Martin
2013-05-14 11:57 ` [Buildroot] [PATCH 3/3] cairo: " Samuel Martin
0 siblings, 2 replies; 6+ messages in thread
From: Samuel Martin @ 2013-05-14 11:57 UTC (permalink / raw)
To: buildroot
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
...t.patch => libglib2-0001-make-codegen-python2-python3-compliant.patch} | 0
.../libglib2/{libglib2-no-tests.patch => libglib2-0002-no-tests.patch} | 0
.../{libglib2-optional-ipv6.patch => libglib2-0003-optional-ipv6.patch} | 0
3 files changed, 0 insertions(+), 0 deletions(-)
rename package/libglib2/{libglib2-make-codegen-python2-python3-compliant.patch => libglib2-0001-make-codegen-python2-python3-compliant.patch} (100%)
rename package/libglib2/{libglib2-no-tests.patch => libglib2-0002-no-tests.patch} (100%)
rename package/libglib2/{libglib2-optional-ipv6.patch => libglib2-0003-optional-ipv6.patch} (100%)
diff --git a/package/libglib2/libglib2-make-codegen-python2-python3-compliant.patch b/package/libglib2/libglib2-0001-make-codegen-python2-python3-compliant.patch
similarity index 100%
rename from package/libglib2/libglib2-make-codegen-python2-python3-compliant.patch
rename to package/libglib2/libglib2-0001-make-codegen-python2-python3-compliant.patch
diff --git a/package/libglib2/libglib2-no-tests.patch b/package/libglib2/libglib2-0002-no-tests.patch
similarity index 100%
rename from package/libglib2/libglib2-no-tests.patch
rename to package/libglib2/libglib2-0002-no-tests.patch
diff --git a/package/libglib2/libglib2-optional-ipv6.patch b/package/libglib2/libglib2-0003-optional-ipv6.patch
similarity index 100%
rename from package/libglib2/libglib2-optional-ipv6.patch
rename to package/libglib2/libglib2-0003-optional-ipv6.patch
--
1.8.2.3
^ permalink raw reply [flat|nested] 6+ messages in thread* [Buildroot] [PATCH 2/3] libglib2: fix build when toolchain has no thread support 2013-05-14 11:57 [Buildroot] [PATCH 1/3] libglib2: rename patches Samuel Martin @ 2013-05-14 11:57 ` Samuel Martin 2013-05-14 12:07 ` Thomas Petazzoni 2013-05-14 11:57 ` [Buildroot] [PATCH 3/3] cairo: " Samuel Martin 1 sibling, 1 reply; 6+ messages in thread From: Samuel Martin @ 2013-05-14 11:57 UTC (permalink / raw) To: buildroot Signed-off-by: Samuel Martin <s.martin49@gmail.com> --- ...ib2-0004-fix-build-when-no-thread-support.patch | 40 ++++++++++++++++++++++ package/libglib2/libglib2.mk | 3 ++ 2 files changed, 43 insertions(+) create mode 100644 package/libglib2/libglib2-0004-fix-build-when-no-thread-support.patch diff --git a/package/libglib2/libglib2-0004-fix-build-when-no-thread-support.patch b/package/libglib2/libglib2-0004-fix-build-when-no-thread-support.patch new file mode 100644 index 0000000..e1de20a --- /dev/null +++ b/package/libglib2/libglib2-0004-fix-build-when-no-thread-support.patch @@ -0,0 +1,40 @@ +Fix gio/gcancellable.c build when thread support is disabled + +Signed-off-by: "Samuel Martin" <s.martin49@gmail.com> +--- +--- a/gio/gcancellable.c 2013-05-14 10:49:10.656384566 +0200 ++++ b/gio/gcancellable.c 2013-05-14 12:38:46.339432786 +0200 +@@ -263,6 +263,7 @@ g_cancellable_reset (GCancellable *cance + + g_return_if_fail (G_IS_CANCELLABLE (cancellable)); + ++#ifdef G_THREADS_ENABLED + G_LOCK(cancellable); + + priv = cancellable->priv; +@@ -282,6 +283,7 @@ g_cancellable_reset (GCancellable *cance + priv->cancelled = FALSE; + } + G_UNLOCK(cancellable); ++#endif + } + + /** +@@ -612,6 +614,9 @@ g_cancellable_disconnect (GCancellable + if (handler_id == 0 || cancellable == NULL) + return; + ++ g_return_if_fail (G_IS_CANCELLABLE (cancellable)); ++ ++#ifdef G_THREADS_ENABLED + G_LOCK (cancellable); + + priv = cancellable->priv; +@@ -625,6 +630,7 @@ g_cancellable_disconnect (GCancellable + + g_signal_handler_disconnect (cancellable, handler_id); + G_UNLOCK (cancellable); ++#endif + } + + typedef struct { diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk index d78e8ec..3ac78ba 100644 --- a/package/libglib2/libglib2.mk +++ b/package/libglib2/libglib2.mk @@ -67,6 +67,9 @@ HOST_LIBGLIB2_CONF_OPT = \ --disable-tests LIBGLIB2_CONF_OPT += --disable-tests +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),) + LIBGLIB2_CONF_OPT += --with-threads=none --disable-threads +endif LIBGLIB2_DEPENDENCIES = host-pkgconf host-libglib2 libffi zlib $(if $(BR2_NEEDS_GETTEXT),gettext) host-gettext -- 1.8.2.3 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/3] libglib2: fix build when toolchain has no thread support 2013-05-14 11:57 ` [Buildroot] [PATCH 2/3] libglib2: fix build when toolchain has no thread support Samuel Martin @ 2013-05-14 12:07 ` Thomas Petazzoni 2013-05-14 21:23 ` Samuel Martin 0 siblings, 1 reply; 6+ messages in thread From: Thomas Petazzoni @ 2013-05-14 12:07 UTC (permalink / raw) To: buildroot Dear Samuel Martin, On Tue, 14 May 2013 13:57:10 +0200, Samuel Martin wrote: > +--- > +--- a/gio/gcancellable.c 2013-05-14 10:49:10.656384566 +0200 > ++++ b/gio/gcancellable.c 2013-05-14 12:38:46.339432786 +0200 > +@@ -263,6 +263,7 @@ g_cancellable_reset (GCancellable *cance > + > + g_return_if_fail (G_IS_CANCELLABLE (cancellable)); > + > ++#ifdef G_THREADS_ENABLED > + G_LOCK(cancellable); > + > + priv = cancellable->priv; > +@@ -282,6 +283,7 @@ g_cancellable_reset (GCancellable *cance > + priv->cancelled = FALSE; > + } > + G_UNLOCK(cancellable); > ++#endif > + } > + > + /** > +@@ -612,6 +614,9 @@ g_cancellable_disconnect (GCancellable > + if (handler_id == 0 || cancellable == NULL) > + return; > + > ++ g_return_if_fail (G_IS_CANCELLABLE (cancellable)); > ++ > ++#ifdef G_THREADS_ENABLED > + G_LOCK (cancellable); > + > + priv = cancellable->priv; > +@@ -625,6 +630,7 @@ g_cancellable_disconnect (GCancellable > + > + g_signal_handler_disconnect (cancellable, handler_id); > + G_UNLOCK (cancellable); > ++#endif > + } Are you sure about this patch? It completely removes the behavior of the cancellation functions of glib, which may be used even if there are no threads. Are you sure that what needs to be removed is not just the G_LOCK() and G_UNLOCK() calls ? Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/3] libglib2: fix build when toolchain has no thread support 2013-05-14 12:07 ` Thomas Petazzoni @ 2013-05-14 21:23 ` Samuel Martin 0 siblings, 0 replies; 6+ messages in thread From: Samuel Martin @ 2013-05-14 21:23 UTC (permalink / raw) To: buildroot Hi Thomas, all, 2013/5/14 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>: > Dear Samuel Martin, > > On Tue, 14 May 2013 13:57:10 +0200, Samuel Martin wrote: > >> +--- >> +--- a/gio/gcancellable.c 2013-05-14 10:49:10.656384566 +0200 >> ++++ b/gio/gcancellable.c 2013-05-14 12:38:46.339432786 +0200 >> +@@ -263,6 +263,7 @@ g_cancellable_reset (GCancellable *cance >> + >> + g_return_if_fail (G_IS_CANCELLABLE (cancellable)); >> + >> ++#ifdef G_THREADS_ENABLED >> + G_LOCK(cancellable); >> + >> + priv = cancellable->priv; >> +@@ -282,6 +283,7 @@ g_cancellable_reset (GCancellable *cance >> + priv->cancelled = FALSE; >> + } >> + G_UNLOCK(cancellable); >> ++#endif >> + } >> + >> + /** >> +@@ -612,6 +614,9 @@ g_cancellable_disconnect (GCancellable >> + if (handler_id == 0 || cancellable == NULL) >> + return; >> + >> ++ g_return_if_fail (G_IS_CANCELLABLE (cancellable)); >> ++ >> ++#ifdef G_THREADS_ENABLED >> + G_LOCK (cancellable); >> + >> + priv = cancellable->priv; >> +@@ -625,6 +630,7 @@ g_cancellable_disconnect (GCancellable >> + >> + g_signal_handler_disconnect (cancellable, handler_id); >> + G_UNLOCK (cancellable); >> ++#endif >> + } > > > Are you sure about this patch? It completely removes the behavior of > the cancellation functions of glib, which may be used even if there are > no threads. Well, I thought that glib handles that too, but without this patch I always trigger the following error (using this unchanged config: http://autobuild.buildroot.net/results/d49/d491de5a774592929a59f3bfd0b1fd8cbc089ac0/config): --- libtool: compile: /opt/br-output/cairo-fix/host/usr/bin/arm-linux-gcc -DHAVE_CONFIG_H -I. -I.. -I/opt/br-output/cairo-fix/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I../glib -I../glib -I.. -I../gmodule -DG_DISABLE_CAST_CHECKS -DG_THREADS_MANDATORY -DG_DISABLE_DEPRECATED -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/usr/lib/gio/modules\" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DG_DISABLE_SINGLE_INCLUDES -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Os -g2 -Wall -MT libgio_2_0_la-gcancellable.lo -MD -MP -MF .deps/libgio_2_0_la-gcancellable.Tpo -c gcancellable.c -fPIC -DPIC -o .libs/libgio_2_0_la-gcancellable.o gcancellable.c: In function 'g_cancellable_reset': gcancellable.c:273:7: error 'g__cancellable_lock' undeclared (first use in this function) gcancellable.c:273:7: note: each undeclared identifier is reported only once for each function it appears in gcancellable.c: In function 'g_cancellable_disconnect': gcancellable.c:622:7: error 'g__cancellable_lock' undeclared (first use in this function) make[5]: *** [libgio_2_0_la-gcancellable.lo] Error 1 --- > > Are you sure that what needs to be removed is not just the G_LOCK() and > G_UNLOCK() calls ? Actually, it's g_cond_wait that triggers this build failure. Looking at its definition, it should do nothing when thread support is disabled... Note that a more finely grained patch, disabling only the g_cond_wait call, is enough to fix this build issue. Regards, -- Samuel ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 3/3] cairo: fix build when toolchain has no thread support 2013-05-14 11:57 [Buildroot] [PATCH 1/3] libglib2: rename patches Samuel Martin 2013-05-14 11:57 ` [Buildroot] [PATCH 2/3] libglib2: fix build when toolchain has no thread support Samuel Martin @ 2013-05-14 11:57 ` Samuel Martin 2013-05-14 20:06 ` Peter Korsgaard 1 sibling, 1 reply; 6+ messages in thread From: Samuel Martin @ 2013-05-14 11:57 UTC (permalink / raw) To: buildroot Fixes the build failure visible at http://autobuild.buildroot.net/results/d49/d491de5a774592929a59f3bfd0b1fd8cbc089ac0 Signed-off-by: Samuel Martin <s.martin49@gmail.com> --- package/cairo/cairo.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/cairo/cairo.mk b/package/cairo/cairo.mk index 83c82c0..203dbbe 100644 --- a/package/cairo/cairo.mk +++ b/package/cairo/cairo.mk @@ -36,6 +36,10 @@ CAIRO_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \ ac_cv_func_working_mktime=yes jm_cv_func_working_re_compile_pattern=yes \ ac_use_included_regex=no gl_cv_c_restrict=no +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),) + CAIRO_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -DCAIRO_NO_MUTEX=1" +endif + CAIRO_CONF_OPT = \ --enable-trace=no \ --enable-interpreter=no -- 1.8.2.3 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 3/3] cairo: fix build when toolchain has no thread support 2013-05-14 11:57 ` [Buildroot] [PATCH 3/3] cairo: " Samuel Martin @ 2013-05-14 20:06 ` Peter Korsgaard 0 siblings, 0 replies; 6+ messages in thread From: Peter Korsgaard @ 2013-05-14 20:06 UTC (permalink / raw) To: buildroot >>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes: Samuel> Fixes the build failure visible at Samuel> http://autobuild.buildroot.net/results/d49/d491de5a774592929a59f3bfd0b1fd8cbc089ac0 Committed, thanks. -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-05-14 21:23 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-05-14 11:57 [Buildroot] [PATCH 1/3] libglib2: rename patches Samuel Martin 2013-05-14 11:57 ` [Buildroot] [PATCH 2/3] libglib2: fix build when toolchain has no thread support Samuel Martin 2013-05-14 12:07 ` Thomas Petazzoni 2013-05-14 21:23 ` Samuel Martin 2013-05-14 11:57 ` [Buildroot] [PATCH 3/3] cairo: " Samuel Martin 2013-05-14 20:06 ` Peter Korsgaard
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox