Package: mosh
Version: 1.2.4a-1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu trusty ubuntu-patch



In Ubuntu, the attached patch was applied to achieve the following:

  * skip-altivec-ppc64el.patch: Don't use Altivec on powerpc64le.

The Alitvec code in mosh appears to be big-endian-specific.  Obviously,
the right upstream solution is to fix that so it works on LE powerpc,
but this patch works around the issue for now by skipping the Altivec
implementation for ABIv2 (_CALL_ELF = 2), which is the LE ABI.

... Adam

-- System Information:
Debian Release: jessie/sid
  APT prefers trusty-updates
  APT policy: (500, 'trusty-updates'), (500, 'trusty-security'), (500, 'trusty')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.13.0-19-generic (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru mosh-1.2.4a/debian/changelog mosh-1.2.4a/debian/changelog
diff -Nru mosh-1.2.4a/debian/patches/series mosh-1.2.4a/debian/patches/series
--- mosh-1.2.4a/debian/patches/series	1969-12-31 17:00:00.000000000 -0700
+++ mosh-1.2.4a/debian/patches/series	2014-03-29 20:04:04.000000000 -0600
@@ -0,0 +1 @@
+skip-altivec-ppc64el.patch
diff -Nru mosh-1.2.4a/debian/patches/skip-altivec-ppc64el.patch mosh-1.2.4a/debian/patches/skip-altivec-ppc64el.patch
--- mosh-1.2.4a/debian/patches/skip-altivec-ppc64el.patch	1969-12-31 17:00:00.000000000 -0700
+++ mosh-1.2.4a/debian/patches/skip-altivec-ppc64el.patch	2014-03-29 20:04:17.000000000 -0600
@@ -0,0 +1,14 @@
+Description: Don't use Altivec on powerpc64le.
+Author: Adam Conrad <adcon...@ubuntu.com>
+
+--- mosh-1.2.4a.orig/src/crypto/ocb.cc
++++ mosh-1.2.4a/src/crypto/ocb.cc
+@@ -185,7 +185,7 @@
+ 		bl = _mm_slli_epi32(bl, 1);
+ 		return _mm_xor_si128(bl,tmp);
+ 	}
+-#elif __ALTIVEC__
++#elif __ALTIVEC__ && _CALL_ELF != 2
+     #include <altivec.h>
+     typedef vector unsigned block;
+     #define xor_block(x,y)         vec_xor(x,y)

Reply via email to