summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbouyer <bouyer@pkgsrc.org>2018-04-19 09:59:28 +0000
committerbouyer <bouyer@pkgsrc.org>2018-04-19 09:59:28 +0000
commit8deb59ca2739af87644f4106edde20b5f77de6c1 (patch)
treeb6c697122e5ee60b7e25436175e31f78cc9afef0
parent1a0656e371a111bc94d8e93128728514f69fc174 (diff)
downloadpkgsrc-8deb59ca2739af87644f4106edde20b5f77de6c1.tar.gz
src/wddc.cpp has the same miscompilation issue as opencpn's ocpndc.cpp,
so apply the same workaround. Bump PKGREVISION
-rw-r--r--geography/opencpn-plugin-watchdog/Makefile4
-rw-r--r--geography/opencpn-plugin-watchdog/distinfo3
-rw-r--r--geography/opencpn-plugin-watchdog/patches/patch-src_wddc.cpp38
3 files changed, 42 insertions, 3 deletions
diff --git a/geography/opencpn-plugin-watchdog/Makefile b/geography/opencpn-plugin-watchdog/Makefile
index 1a26699cc2c..4235a2f1f0b 100644
--- a/geography/opencpn-plugin-watchdog/Makefile
+++ b/geography/opencpn-plugin-watchdog/Makefile
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.12 2018/04/16 14:34:32 wiz Exp $
+# $NetBSD: Makefile,v 1.13 2018/04/19 09:59:28 bouyer Exp $
#
VERSION= 20180405
DISTNAME= watchdog_pi-${VERSION}
PKGNAME= opencpn-plugin-watchdog-${VERSION}
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= geography
MASTER_SITES= ${MASTER_SITE_GITHUB:=seandepagnier/}
GITHUB_PROJECT= watchdog_pi
diff --git a/geography/opencpn-plugin-watchdog/distinfo b/geography/opencpn-plugin-watchdog/distinfo
index 5687bc0aff4..3599684c300 100644
--- a/geography/opencpn-plugin-watchdog/distinfo
+++ b/geography/opencpn-plugin-watchdog/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2018/04/09 14:18:26 bouyer Exp $
+$NetBSD: distinfo,v 1.9 2018/04/19 09:59:28 bouyer Exp $
SHA1 (watchdog_pi-20180405-4e79fdba96ccd1a17b81166e6956571bf734597d.tar.gz) = e96b4390349488a41d8ca74203a3316512be84cb
RMD160 (watchdog_pi-20180405-4e79fdba96ccd1a17b81166e6956571bf734597d.tar.gz) = 033f0c65129a811b01ce24655c9bc4ec4435f3d8
@@ -7,3 +7,4 @@ Size (watchdog_pi-20180405-4e79fdba96ccd1a17b81166e6956571bf734597d.tar.gz) = 48
SHA1 (patch-cmake_PluginConfigure.cmake) = bc2d6409f95cffee145173280c33f9e7fe439864
SHA1 (patch-src_Alarm.cpp) = 5cbe32ca31ad1ec8407683358e0a5c44ea062e06
SHA1 (patch-src_watchdog_pi.cpp) = bcae586e09820f80ea34d5c497476b0883742b5b
+SHA1 (patch-src_wddc.cpp) = 3c43974da65dfe9a18a77f4b84595a4ab602cfd9
diff --git a/geography/opencpn-plugin-watchdog/patches/patch-src_wddc.cpp b/geography/opencpn-plugin-watchdog/patches/patch-src_wddc.cpp
new file mode 100644
index 00000000000..7fd5908de79
--- /dev/null
+++ b/geography/opencpn-plugin-watchdog/patches/patch-src_wddc.cpp
@@ -0,0 +1,38 @@
+$NetBSD: patch-src_wddc.cpp,v 1.1 2018/04/19 09:59:28 bouyer Exp $
+
+Same problem as opencpn/patches/patch-src_ocpndc.cpp:
+
+For some reason wdDC::DrawEllipse is miscompiled on NetBSD 8.0_BETA and
+gcc 6.4 from HEAD earmv7hf:
+for the tail call to dc->DrawEllipse() the compiler emits a bx instruction,
+but forgets to load the address of the function in the register.
+The memory barrier works around this problem by avoiding the tail-call
+optimisation.
+Other similar functions in this file are properly compiled ...
+I suspect it's related to the vfp register use in these functions.
+
+wdDC::DrawRoundedRectangle appears to be compiled OK, but it's similar
+to ocpnDC::DrawRounderRectangle so to be safe I apply the hack here as well.
+
+--- src/wddc.cpp.orig 2018-04-19 11:16:39.711460532 +0200
++++ src/wddc.cpp 2018-04-19 11:21:45.535313650 +0200
+@@ -712,6 +712,9 @@
+
+ }
+ #endif
++#ifdef __arm__
++ asm volatile("" ::: "memory");
++#endif
+ }
+
+ void wdDC::DrawCircle( wxCoord x, wxCoord y, wxCoord radius )
+@@ -771,6 +774,9 @@
+ glDisable( GL_BLEND );
+ }
+ #endif
++#ifdef __arm__
++ asm volatile("" ::: "memory");
++#endif
+ }
+
+ void wdDC::DrawPolygon( int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset )