All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] domoticz: fix build with gcc <= 4.7
@ 2018-09-17 16:55 Fabrice Fontaine
  2018-09-20 21:50 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Fontaine @ 2018-09-17 16:55 UTC (permalink / raw)
  To: buildroot

sleep_for is not always defined with gcc <= 4.7, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52680

To fix this issue, add -D_GLIBCXX_USE_NANOSLEEP if gcc version is lower
than 4.8

Fixes:
 - http://autobuild.buildroot.net/results/0dada8dd727f32a4500670f6620adb05943ed0b7

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/domoticz/domoticz.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/domoticz/domoticz.mk b/package/domoticz/domoticz.mk
index 7f094d0976..832774a147 100644
--- a/package/domoticz/domoticz.mk
+++ b/package/domoticz/domoticz.mk
@@ -18,6 +18,12 @@ DOMOTICZ_DEPENDENCIES = \
 	sqlite \
 	zlib
 
+# sleep_for, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52680
+ifneq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_8),y)
+DOMOTICZ_CONF_OPTS += \
+	-DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -D_GLIBCXX_USE_NANOSLEEP"
+endif
+
 # Due to the dependency on mosquitto, domoticz depends on
 # !BR2_STATIC_LIBS so set USE_STATIC_BOOST and USE_OPENSSL_STATIC to OFF
 DOMOTICZ_CONF_OPTS += \
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1/1] domoticz: fix build with gcc <= 4.7
  2018-09-17 16:55 [Buildroot] [PATCH 1/1] domoticz: fix build with gcc <= 4.7 Fabrice Fontaine
@ 2018-09-20 21:50 ` Thomas Petazzoni
  2018-09-20 21:52   ` Fabrice Fontaine
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2018-09-20 21:50 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 17 Sep 2018 18:55:47 +0200, Fabrice Fontaine wrote:
> sleep_for is not always defined with gcc <= 4.7, see
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52680
> 
> To fix this issue, add -D_GLIBCXX_USE_NANOSLEEP if gcc version is lower
> than 4.8

First comment in the bug report says:

"""
Don't define that manually,  you should configure gcc with
--enable-libstdccxx-time instead.
"""

So I'm not sure enthusiastic with going in this direction. What about
making domoticz depend on gcc >= 4.8 ?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1/1] domoticz: fix build with gcc <= 4.7
  2018-09-20 21:50 ` Thomas Petazzoni
@ 2018-09-20 21:52   ` Fabrice Fontaine
  0 siblings, 0 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2018-09-20 21:52 UTC (permalink / raw)
  To: buildroot

Dear Thomas,

Le jeu. 20 sept. 2018 ? 23:50, Thomas Petazzoni <
thomas.petazzoni@bootlin.com> a ?crit :

> Hello,
>
> On Mon, 17 Sep 2018 18:55:47 +0200, Fabrice Fontaine wrote:
> > sleep_for is not always defined with gcc <= 4.7, see
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52680
> >
> > To fix this issue, add -D_GLIBCXX_USE_NANOSLEEP if gcc version is lower
> > than 4.8
>
> First comment in the bug report says:
>
> """
> Don't define that manually,  you should configure gcc with
> --enable-libstdccxx-time instead.
> """
>
> So I'm not sure enthusiastic with going in this direction. What about
> making domoticz depend on gcc >= 4.8 ?
>
OK, I will send a new patch with this dependency.

>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

Best Regards,

Fabrice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180920/3e9a99cb/attachment.html>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-09-20 21:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-17 16:55 [Buildroot] [PATCH 1/1] domoticz: fix build with gcc <= 4.7 Fabrice Fontaine
2018-09-20 21:50 ` Thomas Petazzoni
2018-09-20 21:52   ` Fabrice Fontaine

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.