From 77be6cd12f6757ea09a35af1e089a4c9622788fb Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 8 May 2014 12:16:31 +0200 Subject: [PATCH] darktable: finally problem understood and fixed, disable AVX instructions. gcc-4.7.3 generates AVX instructions with -mtune=generic on Intel CPUs supporting the AVX instruction set. --- .../mmsetflush-gcc473-mtune-generic.patch | 16 ---------------- srcpkgs/darktable/template | 6 +++++- 2 files changed, 5 insertions(+), 17 deletions(-) delete mode 100644 srcpkgs/darktable/patches/mmsetflush-gcc473-mtune-generic.patch diff --git a/srcpkgs/darktable/patches/mmsetflush-gcc473-mtune-generic.patch b/srcpkgs/darktable/patches/mmsetflush-gcc473-mtune-generic.patch deleted file mode 100644 index 47a86a9e098..00000000000 --- a/srcpkgs/darktable/patches/mmsetflush-gcc473-mtune-generic.patch +++ /dev/null @@ -1,16 +0,0 @@ -Comment _MM_SET_FLUSH_ZERO_MODE for now. - -gcc-4.7.3 with -mtune=generic uses STMXCSR/VSTMXCSR instructions which are -only available in Sandy Bridge CPUs, thus causes a SIGILL on AMD CPUs. - ---- src/common/darktable.c.orig 2014-05-08 11:42:15.844554271 +0200 -+++ src/common/darktable.c 2014-05-08 11:43:00.724288778 +0200 -@@ -363,7 +363,7 @@ int dt_init(int argc, char *argv[], cons - #endif - - // make everything go a lot faster. -- _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); -+ //_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); - #if !defined __APPLE__ && !defined __WIN32__ - _dt_sigsegv_old_handler = signal(SIGSEGV,&_dt_sigsegv_handler); - #endif diff --git a/srcpkgs/darktable/template b/srcpkgs/darktable/template index 8fd0a6999dc..a8c5437fbe7 100644 --- a/srcpkgs/darktable/template +++ b/srcpkgs/darktable/template @@ -1,7 +1,7 @@ # Template file for 'darktable' pkgname=darktable version=1.4.2 -revision=5 +revision=6 build_style=cmake maintainer="Carlo Dormeletti " homepage="http://www.darktable.org/" @@ -17,6 +17,10 @@ makedepends="gtk+-devel glib-devel exiv2-devel lcms2-devel distfiles="${SOURCEFORGE_SITE}/${pkgname}/1.4/${pkgname}-${version}.tar.xz" checksum="c1311a6e336007b85d21647652ebec3e26840248a968eab04ab5f0a56c2e0709" +# Do not generate AVX instructions, which might happen with -mtune=generic on +# Intel CPUs. This avoids the vstmxcsr instruction which is AVX specific. +CFLAGS="-mno-avx -mno-avx2" + post_install() { mv ${DESTDIR}/usr/lib/darktable/libdarktable.so ${DESTDIR}/usr/lib/ }