$NetBSD: patch-aa,v 1.3 2006/11/24 13:02:49 drochner Exp $

--- liboil/liboilcpu.c.orig	2006-11-06 02:37:03.000000000 +0100
+++ liboil/liboilcpu.c
@@ -518,6 +518,14 @@ oil_cpu_detect_cpuid (void)
     OIL_INFO("L2 cache: %d kbytes, %d assoc, %d lines/tag, %d line size",
         (ecx>>16)&0xffff, (ecx>>12)&0xf, (ecx>>8)&0xf, ecx&0xff);
   }
+
+#ifdef __i386__
+  /*
+   * gcc (4.1) doesn't get the alignment of automatic __m128i variables
+   * right, leading to GPFs depending on stack alignment on function call.
+   */
+  oil_cpu_flags &= ~(OIL_IMPL_FLAG_SSE2 | OIL_IMPL_FLAG_SSE3);
+#endif
 }
 
 /* Reduce the set of CPU capabilities detected by whatever detection mechanism
