Hi,

A short time after I checked the arm build-failures[1], Juan Francisco
Cantero Hurtado sent me a patch to fix it (thanks!).

In this diff:
- fix attempt for the build
- provide more debugging information wrt. /dev/urandom failure reported
  by juanfra
- enable regress tests (they touch ocb)

People with ARM boxes, please build, run make test and test the runtime
behavior.

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/mosh/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- Makefile    11 Jun 2013 15:51:58 -0000      1.3
+++ Makefile    8 Oct 2013 12:28:33 -0000
@@ -31,7 +31,4 @@ CONFIGURE_STYLE =     gnu
 CONFIGURE_ARGS =       --disable-hardening
 CONFIGURE_ENV =                ac_cv_have_decl_htobe64=yes LDFLAGS="-Wl,-z,now"
 
-# upstream says 1.3 will ship with tests
-NO_TEST =              Yes
-
 .include <bsd.port.mk>
Index: patches/patch-src_crypto_crypto_cc
===================================================================
RCS file: patches/patch-src_crypto_crypto_cc
diff -N patches/patch-src_crypto_crypto_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_crypto_crypto_cc  8 Oct 2013 12:08:35 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+--- src/crypto/crypto.cc.orig  Tue Oct  8 14:08:29 2013
++++ src/crypto/crypto.cc       Tue Oct  8 14:07:10 2013
+@@ -126,7 +126,9 @@ Base64Key::Base64Key()
+ 
+   devrandom.read( reinterpret_cast<char *>( key ), sizeof( key ) );
+   if ( !devrandom ) {
+-    throw CryptoException( "Could not read from " + string( rdev ) );
++    throw CryptoException( "Could not read from " + string( rdev )
++                         + " in " + string( __func__ ) + ": "
++                         + string( strerror( errno ) ) );
+   }
+ }
+ 
Index: patches/patch-src_crypto_ocb_cc
===================================================================
RCS file: patches/patch-src_crypto_ocb_cc
diff -N patches/patch-src_crypto_ocb_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_crypto_ocb_cc     8 Oct 2013 11:50:44 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+Use generic code on ARM instead of asm because of some unsupported
+(Thumbv2) instructions.
+Introduced by https://github.com/keithw/mosh/issues/86
+--- src/crypto/ocb.cc.orig     Tue Oct  8 11:57:42 2013
++++ src/crypto/ocb.cc  Tue Oct  8 11:58:01 2013
+@@ -298,7 +298,7 @@
+         return swap_if_le(rval);
+       }
+ 
+-      #if __GNUC__ && __arm__
++      #if 0
+       static inline block double_block(block b) {
+               __asm__ ("adds %1,%1,%1\n\t"
+                                "adcs %H1,%H1,%H1\n\t"

Reply via email to