Re: libjpeg causes crash

Juan Francisco Cantero Hurtado <[email protected]>
Newsgroups gmane.os.openbsd.ppc
Message-ID <[email protected]>
On Mon, Mar 06, 2017 at 11:32:33AM +0100, luca wrote:
> * -> 21:09:33 (domenica 05 marzo 2017)
> * -> "Herminio Hernandez, Jr.":
> 
> >  G3 CPUs do not support Altivec.
> 
> It's not totally true.
> 
> G3:
> - ...
> - 750fx (it's my)
> - 750gx
> - 750vx (+altivec, but it was never released)
> - 750cl
> 
> G4:
> - 7400 (+altivec)
> 
> I hope OpenBSD Hackers solve the problem in the next release.

Are you using -current or 6.0? If you're using -current, try this patch.

- Apply the patch
- make clean=all
- make update

diff --git Makefile Makefile
index 302a754201c..3889078895d 100644
--- Makefile
+++ Makefile
@@ -5,7 +5,7 @@ COMMENT=	SIMD-accelerated JPEG codec replacement of libjpeg
 V=		1.5.1
 DISTNAME=	jpeg-turbo-${V}
 PKGNAME=	jpeg-${V}
-REVISION=	0
+REVISION=	1
 EPOCH=		0
 
 SHARED_LIBS+=	jpeg		68.1	# 64.0
diff --git patches/patch-simd_jsimd_powerpc_c patches/patch-simd_jsimd_powerpc_c
deleted file mode 100644
index 5a5c044d34c..00000000000
--- patches/patch-simd_jsimd_powerpc_c
+++ /dev/null
@@ -1,32 +0,0 @@
-$OpenBSD: patch-simd_jsimd_powerpc_c,v 1.1 2016/12/03 11:22:50 landry Exp $
-
-Detect Altivec support on ppc.
-
---- simd/jsimd_powerpc.c.orig	Wed Sep 21 01:36:59 2016
-+++ simd/jsimd_powerpc.c	Fri Dec  2 19:23:14 2016
-@@ -26,6 +26,12 @@
- #include <string.h>
- #include <ctype.h>
- 
-+#if defined(__OpenBSD__)
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#include <machine/cpu.h>
-+#endif
-+
- static unsigned int simd_support = ~0;
- 
- #if defined(__linux__) || defined(ANDROID) || defined(__ANDROID__)
-@@ -116,6 +122,12 @@ init_simd (void)
-     if (bufsize > SOMEWHAT_SANE_PROC_CPUINFO_SIZE_LIMIT)
-       break;
-   }
-+#elif defined(__OpenBSD__)
-+  int mib[2] = { CTL_MACHDEP, CPU_ALTIVEC };
-+  int altivec;
-+  size_t len = sizeof(altivec);
-+  if (sysctl(mib, 2, &altivec, &len, NULL, 0) == 0 && altivec != 0)
-+    simd_support |= JSIMD_ALTIVEC;
- #endif
- 
-   /* Force different settings through environment variables */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.