pkgsrc/devel/liboil/patches/patch-aa
tnn 0e0478034d Patches for upstream commit c77faaaa2fc48586902878ba33bd01286654dcb6:
- Add workaround for older versions of gas that don't have SSE3 support

Reported in PR pkg/38126.
2008-02-29 16:58:14 +00:00

84 lines
1.9 KiB
Text

$NetBSD: patch-aa,v 1.8 2008/02/29 16:58:14 tnn Exp $
--- configure.orig 2008-02-29 17:53:58.000000000 +0100
+++ configure
@@ -16369,6 +16369,79 @@ fi
+ { echo "$as_me:$LINENO: checking if compiler supports 'pmaddubsw %%mm0, %%mm0' asm instruction" >&5
+echo $ECHO_N "checking if compiler supports 'pmaddubsw %%mm0, %%mm0' asm instruction... $ECHO_C" >&6; }
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#ifndef __GNUC__
+#error Not GCC
+#endif
+#ifdef __GNUC_MINOR__
+#if (__GNUC__ * 1000 + __GNUC_MINOR__) < 3004
+#error GCC before 3.4 has critical bugs compiling inline assembly
+#endif
+#endif
+__asm__ ("pmaddubsw %%mm0, %%mm0"::)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ flag_ok=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ flag_ok=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ if test "X$flag_ok" = Xyes ; then
+ HAVE_SSSE3_ASM=yes
+ true
+ else
+ HAVE_SSSE3_ASM=no
+ true
+ fi
+ { echo "$as_me:$LINENO: result: $flag_ok" >&5
+echo "${ECHO_T}$flag_ok" >&6; }
+
+if test "x$HAVE_SSSE3_ASM" = xyes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SSSE3_ASM 1
+_ACEOF
+
+fi
+
+
cat >>confdefs.h <<\_ACEOF
#define OIL_EXPORTS 1
_ACEOF