summaryrefslogtreecommitdiff
path: root/geography
diff options
context:
space:
mode:
authorbouyer <bouyer@pkgsrc.org>2017-09-12 17:31:20 +0000
committerbouyer <bouyer@pkgsrc.org>2017-09-12 17:31:20 +0000
commit33ef1f7ea005af5d89b455f819e15ca45ee96d33 (patch)
tree33bc458218d08f2679d5513ca705ddc1fc8c2544 /geography
parent2cc22b4554bc52759302c34f5073295681f1e4f5 (diff)
downloadpkgsrc-33ef1f7ea005af5d89b455f819e15ca45ee96d33.tar.gz
Fix opencpn on arm
For some reason ocpnDC::DrawEllipse is miscompiled on NetBSD 8.0_BETA 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. Add a memory barrier to works around this problem by avoiding the tail-call optimisation. Other similar functions in this file are properly compiled ... Bump PKGREVISION
Diffstat (limited to 'geography')
-rw-r--r--geography/opencpn/Makefile4
-rw-r--r--geography/opencpn/distinfo3
-rw-r--r--geography/opencpn/patches/patch-src_ocpndc.cpp20
3 files changed, 24 insertions, 3 deletions
diff --git a/geography/opencpn/Makefile b/geography/opencpn/Makefile
index 6f70c1c53ea..4459c228541 100644
--- a/geography/opencpn/Makefile
+++ b/geography/opencpn/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.16 2017/08/24 20:03:19 adam Exp $
+# $NetBSD: Makefile,v 1.17 2017/09/12 17:31:20 bouyer Exp $
#
VERSION= 4.8.0
-#PKGREVISION= 0
+PKGREVISION= 1
DISTNAME= OpenCPN-${VERSION}
PKGNAME= opencpn-${VERSION}
PKGREVISION= 1
diff --git a/geography/opencpn/distinfo b/geography/opencpn/distinfo
index 6eb47bc1747..4a5570829d7 100644
--- a/geography/opencpn/distinfo
+++ b/geography/opencpn/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.13 2017/08/24 12:56:57 bouyer Exp $
+$NetBSD: distinfo,v 1.14 2017/09/12 17:31:20 bouyer Exp $
SHA1 (OpenCPN-4.8.0-a13bc435462ae6c029660f1caa458dca79c927ec.zip) = 33ecc34915951c270fd758ec00a69574bc44ea25
RMD160 (OpenCPN-4.8.0-a13bc435462ae6c029660f1caa458dca79c927ec.zip) = 084ad8ace3336954402a17b7610c3e2807a270a1
@@ -17,4 +17,5 @@ SHA1 (patch-src_chart1.cpp) = ae7c1d8a59c9a275914a613205de71e2dca89dc6
SHA1 (patch-src_crashprint.cpp) = a96e8aa980eb3b19c3dce3343582511d608e6625
SHA1 (patch-src_glu_CMakeLists.txt) = d63494a41071097252ac9e2cb95db75041f30b62
SHA1 (patch-src_mipmap_mipmap.c) = 3bdb2c37e7a6d89fc6a531af6e0396a1ff385aeb
+SHA1 (patch-src_ocpndc.cpp) = cd425bec24050176a08e7ec8280bf853fd10c756
SHA1 (patch-src_tcmgr.cpp) = 3fb4edf3368f3f3907f231ebcabd8e5061699040
diff --git a/geography/opencpn/patches/patch-src_ocpndc.cpp b/geography/opencpn/patches/patch-src_ocpndc.cpp
new file mode 100644
index 00000000000..422d63401f8
--- /dev/null
+++ b/geography/opencpn/patches/patch-src_ocpndc.cpp
@@ -0,0 +1,20 @@
+$NetBSD: patch-src_ocpndc.cpp,v 1.1 2017/09/12 17:31:20 bouyer Exp $
+For some reason ocpnDC::DrawEllipse is miscompiled on NetBSD 8.0_BETA 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 ...
+
+--- src/ocpndc.cpp.orig 2017-09-12 15:29:07.101981729 +0200
++++ src/ocpndc.cpp 2017-09-12 17:00:40.945848063 +0200
+@@ -769,6 +769,9 @@
+ glDisable( GL_BLEND );
+ }
+ #endif
++#ifdef __arm__
++ asm volatile("" ::: "memory");
++#endif
+ }
+
+ void ocpnDC::DrawPolygon( int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset, float scale )