darktable: patch to workaround a gcc-4.7.3 issue with -mtune=generic.

This commit is contained in:
Juan RP 2014-05-08 11:58:56 +02:00
parent a4543d5217
commit 9bd8c76ff5
2 changed files with 17 additions and 7 deletions

View File

@ -0,0 +1,16 @@
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

View File

@ -1,7 +1,7 @@
# Template file for 'darktable'
pkgname=darktable
version=1.4.2
revision=4
revision=5
build_style=cmake
maintainer="Carlo Dormeletti <carlo.dormeletti@email.it>"
homepage="http://www.darktable.org/"
@ -17,12 +17,6 @@ makedepends="gtk+-devel glib-devel exiv2-devel lcms2-devel
distfiles="${SOURCEFORGE_SITE}/${pkgname}/1.4/${pkgname}-${version}.tar.xz"
checksum="c1311a6e336007b85d21647652ebec3e26840248a968eab04ab5f0a56c2e0709"
# This needs to be built with SSE, otherwise some CPUs might crash with
# an ilegal instruction (vstmxcsr). Notably most AMD CPUs with -mtune=generic.
#
# Let's assume this has been fixed in recent gcc versions and just force SSE.
CFLAGS="-msse"
post_install() {
mv ${DESTDIR}/usr/lib/darktable/libdarktable.so ${DESTDIR}/usr/lib/
}