Skip to contentSkip to conversation

gpsd: fix compile for microblaze arch

PATCH New Waldemar Brodkorb 3 participants 3 messages Aug 13, 2017 – Sep 6, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpsd: fix compile for microblaze arch

Disable O2 and add O0. The suggested flags in the gcc report are not enough for gcc >= 6.

Fixes:
http://autobuild.buildroot.net/results/368/3686cd3f3e7b6aee84f4377bd2dded1115321fb3/

---
 package/gpsd/0002-do-not-append-O2.patch | 18 ++++++++++++++++++
 package/gpsd/gpsd.mk                     |  2 +-
 2 files changed, 19 insertions(+), 1 deletion(-)
 create mode 100644 package/gpsd/0002-do-not-append-O2.patch
package/gpsd/0002-do-not-append-O2.patch new file +18 -0
new file mode 100644
index 000000000..585c82835
@@ -0,0 +1,18 @@
+Disable default O2 passing
+
+Signed-off-by: Waldemar Brodkorb <[email protected]>
+
+diff -Nur gpsd-3.16.orig/SConstruct gpsd-3.16/SConstruct
+--- gpsd-3.16.orig/SConstruct	2016-01-08 20:25:48.000000000 +0100
++++ gpsd-3.16/SConstruct	2017-08-13 10:42:14.082794656 +0200
+@@ -330,9 +330,7 @@
+     # Should we build with optimisation?
+     if env['debug'] or env['coveraging']:
+         env.Append(CCFLAGS=['-O0'])
+-    else:
+-        env.Append(CCFLAGS=['-O2'])
+-
++#
+ # Get a slight speedup by not doing automatic RCS and SCCS fetches.
+ env.SourceCode('.', None)
+ 
package/gpsd/gpsd.mk +1 -1
index 552d6d936..2b9c38a42 100644
@@ -44,7 +44,7 @@ endif
 # A bug was reported to the gcc bug tracker:
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485
 ifeq ($(BR2_microblaze),y)
-GPSD_CFLAGS += -fno-expensive-optimizations -fno-schedule-insns
+GPSD_CFLAGS += -O0
 endif
 
 # Enable or disable Qt binding
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 gpsd: fix compile for microblaze arch

Hello,

Quoted 6 lines · Waldemar Brodkorb

Disable O2 and add O0. The suggested flags in the gcc report are not enough for gcc >= 6.

Fixes:
http://autobuild.buildroot.net/results/368/3686cd3f3e7b6aee84f4377bd2dded1115321fb3/

Quoted 6 lines
---
 package/gpsd/0002-do-not-append-O2.patch | 18 ++++++++++++++++++
 package/gpsd/gpsd.mk                     |  2 +-
 2 files changed, 19 insertions(+), 1 deletion(-)
 create mode 100644 package/gpsd/0002-do-not-append-O2.patch

I've applied to master. However, before doing this, I had to reformat the patch using Git, and improve the patch description, which was a bit too terse: it was only saying what the patch is doing (which is obvious by reading the patch), but not *why* you're doing it.

Also, please use Git to format patches when the upstream project is hosted in Git.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 gpsd: fix compile for microblaze arch

In reply to Waldemar Brodkorb
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Waldemar" == Waldemar Brodkorb <[email protected]> writes:

Disable O2 and add O0. The suggested flags in the gcc report are not enough for gcc >= 6.

Fixes:
http://autobuild.buildroot.net/results/368/3686cd3f3e7b6aee84f4377bd2dded1115321fb3/

Committed to 2017.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard