pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/geography/opencpn-plugin-watchdog src/wddc.cpp has the...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a43eaf8fb356
branches:  trunk
changeset: 379020:a43eaf8fb356
user:      bouyer <bouyer%pkgsrc.org@localhost>
date:      Thu Apr 19 09:59:28 2018 +0000

description:
src/wddc.cpp has the same miscompilation issue as opencpn's ocpndc.cpp,
so apply the same workaround.
Bump PKGREVISION

diffstat:

 geography/opencpn-plugin-watchdog/Makefile                   |   4 +-
 geography/opencpn-plugin-watchdog/distinfo                   |   3 +-
 geography/opencpn-plugin-watchdog/patches/patch-src_wddc.cpp |  38 ++++++++++++
 3 files changed, 42 insertions(+), 3 deletions(-)

diffs (72 lines):

diff -r 6353a095582c -r a43eaf8fb356 geography/opencpn-plugin-watchdog/Makefile
--- a/geography/opencpn-plugin-watchdog/Makefile        Thu Apr 19 08:23:12 2018 +0000
+++ b/geography/opencpn-plugin-watchdog/Makefile        Thu Apr 19 09:59:28 2018 +0000
@@ -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 -r 6353a095582c -r a43eaf8fb356 geography/opencpn-plugin-watchdog/distinfo
--- a/geography/opencpn-plugin-watchdog/distinfo        Thu Apr 19 08:23:12 2018 +0000
+++ b/geography/opencpn-plugin-watchdog/distinfo        Thu Apr 19 09:59:28 2018 +0000
@@ -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 @@
 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 -r 6353a095582c -r a43eaf8fb356 geography/opencpn-plugin-watchdog/patches/patch-src_wddc.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/geography/opencpn-plugin-watchdog/patches/patch-src_wddc.cpp      Thu Apr 19 09:59:28 2018 +0000
@@ -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 )



Home | Main Index | Thread Index | Old Index