From 98cca0e5fcb486153ca55f981f8f65ba6da5adea Mon Sep 17 00:00:00 2001 From: Mark Mentovai Date: Mon, 16 Mar 2015 13:41:48 -0400 Subject: [PATCH] compat/mac: 10.6 SDK compatibility for pre-Xcode 4.2 10.6 SDK. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some definitions were added to the 10.6 SDK during its lifetime, and aren’t present in older versions of the SDK. The AVX definitions are in this group. Apparently, not all of Chrome’s builders use the same version of this SDK. A try bot failure was encountered for https://codereview.chromium.org/1011503002/ in http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/33868/steps/compile%20%28with%20patch%29/logs/stdio. This provides definitions in compat for when they aren’t available from the SDK. TEST=compile R=rsesek@chromium.org Review URL: https://codereview.chromium.org/1001733003 --- compat/mac/mach/mach.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/compat/mac/mach/mach.h b/compat/mac/mach/mach.h index adf38c33..0cf86d05 100644 --- a/compat/mac/mach/mach.h +++ b/compat/mac/mach/mach.h @@ -61,6 +61,23 @@ // +// 10.6 SDK +// +// Earlier versions of this SDK didn’t have AVX definitions. They didn’t appear +// until the version of the 10.6 SDK that shipped with Xcode 4.2, although +// versions of this SDK appeared with Xcode releases as early as Xcode 3.2. +// Similarly, the kernel didn’t handle AVX state until Mac OS X 10.6.8 +// (xnu-1504.15.3) and presumably the hardware-specific versions of Mac OS X +// 10.6.7 intended to run on processors with AVX. + +#ifndef x86_AVX_STATE32 +#define x86_AVX_STATE32 16 +#endif + +#ifndef x86_AVX_STATE64 +#define x86_AVX_STATE64 17 +#endif + // 10.8 SDK #ifndef x86_AVX_STATE