* [Buildroot] [PATCH v2] gpsd: add work-around and re-enable for microblaze
@ 2015-11-22 12:24 Sergio Prado
2015-11-22 12:57 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Sergio Prado @ 2015-11-22 12:24 UTC (permalink / raw)
To: buildroot
Fix (works around) bug #6872
https://bugs.busybox.net/show_bug.cgi?id=6872
The gpsd package was disabled due to an internal compiler error for
the microblaze architecture in the following commit:
http://git.buildroot.net/buildroot/commit/?id=d517415bcda380336f4a27bf248cef4d81791c9e
The problem is due to an specific GCC optimization flag
(-fexpensive-optimizations), so disabling it we can work around this
problem and compile gpsd for the microblaze architecture.
Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
Changes v1 -> v2:
- added a comment explaining why we are disabling the optimization flag.
---
package/gpsd/Config.in | 3 ---
package/gpsd/gpsd.mk | 8 +++++++-
package/sconeserver/Config.in | 2 --
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/package/gpsd/Config.in b/package/gpsd/Config.in
index fa8b8f6b2ad5..b4008ebd8353 100644
--- a/package/gpsd/Config.in
+++ b/package/gpsd/Config.in
@@ -1,7 +1,6 @@
comment "gpsd needs a toolchain w/ threads, dynamic library"
depends on BR2_USE_MMU
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
- depends on !BR2_microblaze
config BR2_PACKAGE_GPSD
bool "gpsd"
@@ -10,8 +9,6 @@ config BR2_PACKAGE_GPSD
depends on BR2_TOOLCHAIN_HAS_THREADS
# Always tries to build a shared library
depends on !BR2_STATIC_LIBS
- # triggers gcc ice
- depends on !BR2_microblaze
help
gpsd is a service daemon that monitors one or more GPSes or AIS
receivers attached to a host computer through serial or USB ports,
diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk
index 87911c3905fe..aa35053baf09 100644
--- a/package/gpsd/gpsd.mk
+++ b/package/gpsd/gpsd.mk
@@ -13,6 +13,7 @@ GPSD_INSTALL_STAGING = YES
GPSD_DEPENDENCIES = host-scons host-pkgconf
GPSD_LDFLAGS = $(TARGET_LDFLAGS)
+GPSD_CFLAGS = $(TARGET_CFLAGS)
GPSD_SCONS_ENV = $(TARGET_CONFIGURE_OPTS)
@@ -37,6 +38,11 @@ else
GPSD_SCONS_OPTS += libgpsmm=no
endif
+# prevents from triggering GCC ICE
+ifeq ($(BR2_microblaze),y)
+GPSD_CFLAGS += -fno-expensive-optimizations
+endif
+
# Enable or disable Qt binding
ifeq ($(BR2_PACKAGE_QT_NETWORK),y)
GPSD_SCONS_ENV += QMAKE="$(QT_QMAKE)"
@@ -185,7 +191,7 @@ ifeq ($(BR2_PACKAGE_GPSD_MAX_DEV),y)
GPSD_SCONS_OPTS += limited_max_devices=$(BR2_PACKAGE_GPSD_MAX_DEV_VALUE)
endif
-GPSD_SCONS_ENV += LDFLAGS="$(GPSD_LDFLAGS)"
+GPSD_SCONS_ENV += LDFLAGS="$(GPSD_LDFLAGS)" CFLAGS="$(GPSD_CFLAGS)"
define GPSD_BUILD_CMDS
(cd $(@D); \
diff --git a/package/sconeserver/Config.in b/package/sconeserver/Config.in
index f16e683bf563..4083aa7dce36 100644
--- a/package/sconeserver/Config.in
+++ b/package/sconeserver/Config.in
@@ -63,7 +63,6 @@ config BR2_PACKAGE_SCONESERVER_LOCATION
bool "location"
depends on BR2_USE_MMU # gpsd
depends on BR2_TOOLCHAIN_HAS_THREADS # gpsd
- depends on !BR2_microblaze # gpsd
depends on !BR2_STATIC_LIBS # gpsd
select BR2_PACKAGE_GPSD
help
@@ -72,7 +71,6 @@ config BR2_PACKAGE_SCONESERVER_LOCATION
comment "location support needs a toolchain w/ theads, dynamic library"
depends on BR2_USE_MMU
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBRARY
- depends on !BR2_microblaze
config BR2_PACKAGE_SCONESERVER_LETTUCE
bool "lettuce"
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v2] gpsd: add work-around and re-enable for microblaze
2015-11-22 12:24 [Buildroot] [PATCH v2] gpsd: add work-around and re-enable for microblaze Sergio Prado
@ 2015-11-22 12:57 ` Thomas Petazzoni
2015-11-22 15:27 ` Sergio Prado
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2015-11-22 12:57 UTC (permalink / raw)
To: buildroot
Dear Sergio Prado,
On Sun, 22 Nov 2015 10:24:00 -0200, Sergio Prado wrote:
> Fix (works around) bug #6872
> https://bugs.busybox.net/show_bug.cgi?id=6872
>
> The gpsd package was disabled due to an internal compiler error for
> the microblaze architecture in the following commit:
> http://git.buildroot.net/buildroot/commit/?id=d517415bcda380336f4a27bf248cef4d81791c9e
>
> The problem is due to an specific GCC optimization flag
> (-fexpensive-optimizations), so disabling it we can work around this
> problem and compile gpsd for the microblaze architecture.
>
> Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com>
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
> Changes v1 -> v2:
> - added a comment explaining why we are disabling the optimization flag.
> ---
> package/gpsd/Config.in | 3 ---
> package/gpsd/gpsd.mk | 8 +++++++-
> package/sconeserver/Config.in | 2 --
> 3 files changed, 7 insertions(+), 6 deletions(-)
Applied to master, thanks. Could you test with gcc 5.x, and if the
problem still exists, report a bug to the gcc bug tracker ? While your
workaround is OK, it is not good for gcc to fail this way when building
gpsd.
Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v2] gpsd: add work-around and re-enable for microblaze
2015-11-22 12:57 ` Thomas Petazzoni
@ 2015-11-22 15:27 ` Sergio Prado
2015-11-22 15:32 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Sergio Prado @ 2015-11-22 15:27 UTC (permalink / raw)
To: buildroot
Hello Thomas,
I have tested with GCC 5.2.0. The bug persists and was reported in the gcc
bug tracker:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485
Actually, in GCC 5.X I had to also disable another optimization flag
(-fschedule-insns). I'm finishing the tests of this change with both GCC
4.9 and GCC 5.2 to send you a new patch to fix it.
Regards,
Sergio Prado
Embedded Labworks
Office: +55 11 2628-3461
Mobile: +55 11 97123-3420
2015-11-22 10:57 GMT-02:00 Thomas Petazzoni <
thomas.petazzoni@free-electrons.com>:
> Dear Sergio Prado,
>
> On Sun, 22 Nov 2015 10:24:00 -0200, Sergio Prado wrote:
> > Fix (works around) bug #6872
> > https://bugs.busybox.net/show_bug.cgi?id=6872
> >
> > The gpsd package was disabled due to an internal compiler error for
> > the microblaze architecture in the following commit:
> >
> http://git.buildroot.net/buildroot/commit/?id=d517415bcda380336f4a27bf248cef4d81791c9e
> >
> > The problem is due to an specific GCC optimization flag
> > (-fexpensive-optimizations), so disabling it we can work around this
> > problem and compile gpsd for the microblaze architecture.
> >
> > Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com>
> > Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> > ---
> > Changes v1 -> v2:
> > - added a comment explaining why we are disabling the optimization
> flag.
> > ---
> > package/gpsd/Config.in | 3 ---
> > package/gpsd/gpsd.mk | 8 +++++++-
> > package/sconeserver/Config.in | 2 --
> > 3 files changed, 7 insertions(+), 6 deletions(-)
>
> Applied to master, thanks. Could you test with gcc 5.x, and if the
> problem still exists, report a bug to the gcc bug tracker ? While your
> workaround is OK, it is not good for gcc to fail this way when building
> gpsd.
>
> Thanks a lot!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20151122/91d0cc95/attachment.html>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v2] gpsd: add work-around and re-enable for microblaze
2015-11-22 15:27 ` Sergio Prado
@ 2015-11-22 15:32 ` Thomas Petazzoni
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2015-11-22 15:32 UTC (permalink / raw)
To: buildroot
Sergio,
On Sun, 22 Nov 2015 13:27:13 -0200, Sergio Prado wrote:
> I have tested with GCC 5.2.0. The bug persists and was reported in the gcc
> bug tracker:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485
>
> Actually, in GCC 5.X I had to also disable another optimization flag
> (-fschedule-insns). I'm finishing the tests of this change with both GCC
> 4.9 and GCC 5.2 to send you a new patch to fix it.
Great, thanks a lot for the additional testing. Please add a reference
to this gcc bug report in a comment above the CFLAGS modification in
gpsd.mk, so that we keep track of why we're doing this work-around.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-22 15:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-22 12:24 [Buildroot] [PATCH v2] gpsd: add work-around and re-enable for microblaze Sergio Prado
2015-11-22 12:57 ` Thomas Petazzoni
2015-11-22 15:27 ` Sergio Prado
2015-11-22 15:32 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox