diff options
Diffstat (limited to 'security/gnutls/patches/patch-lib_accelerated_x86_x86-common.c')
-rw-r--r-- | security/gnutls/patches/patch-lib_accelerated_x86_x86-common.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/security/gnutls/patches/patch-lib_accelerated_x86_x86-common.c b/security/gnutls/patches/patch-lib_accelerated_x86_x86-common.c new file mode 100644 index 00000000000..95595f96ed5 --- /dev/null +++ b/security/gnutls/patches/patch-lib_accelerated_x86_x86-common.c @@ -0,0 +1,15 @@ +$NetBSD: patch-lib_accelerated_x86_x86-common.c,v 1.1 2017/04/10 10:43:49 jperkin Exp $ + +Avoid unsupported xgetbv instruction on older Darwin assemblers. + +--- lib/accelerated/x86/x86-common.c.orig 2017-01-22 00:00:30.000000000 +0000 ++++ lib/accelerated/x86/x86-common.c +@@ -101,6 +101,8 @@ static unsigned check_4th_gen_intel_feat + + #if defined(_MSC_VER) + xcr0 = _xgetbv(0); ++#elif defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070 ++ return 0; + #else + __asm__ ("xgetbv" : "=a" (xcr0) : "c" (0) : "%edx"); + #endif |