about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2019-07-29 14:35:42 +0200
committerbjorn3 <bjorn3@users.noreply.github.com>2019-07-29 14:35:42 +0200
commitaae9a8b91dafe09adee1d80079e79526f57d29eb (patch)
tree98ea681008dc172e49628cf4d51f48dc5ba893c2
parent9f0fad00243c6b1c5b491e40cb1d5b04daa51b93 (diff)
downloadrust-aae9a8b91dafe09adee1d80079e79526f57d29eb.tar.gz
rust-aae9a8b91dafe09adee1d80079e79526f57d29eb.zip
Patch core_arch to tell programs that cpuid is not supported
-rw-r--r--patches/0016-Disable-cpuid-intrinsic.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/patches/0016-Disable-cpuid-intrinsic.patch b/patches/0016-Disable-cpuid-intrinsic.patch
new file mode 100644
index 00000000000..ac24bc6e88c
--- /dev/null
+++ b/patches/0016-Disable-cpuid-intrinsic.patch
@@ -0,0 +1,25 @@
+From 7403e2998345ef0650fd50628d7098d4d1e88e5c Mon Sep 17 00:00:00 2001
+From: bjorn3 <bjorn3@users.noreply.github.com>
+Date: Sat, 6 Apr 2019 12:16:21 +0200
+Subject: [PATCH] Remove usage of unsized locals
+
+---
+ src/stdarch/crates/core_arch/src/x86/cpuid.rs | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/src/stdarch/crates/core_arch/src/x86/cpuid.rs b/src/stdarch/crates/core_arch/src/x86/cpuid.rs
+index f313c42..ff952bc 100644
+--- a/src/stdarch/crates/core_arch/src/x86/cpuid.rs
++++ b/src/stdarch/crates/core_arch/src/x86/cpuid.rs
+@@ -84,6 +84,9 @@ pub unsafe fn __cpuid(leaf: u32) -> CpuidResult {
+ /// Does the host support the `cpuid` instruction?
+ #[inline]
+ pub fn has_cpuid() -> bool {
++    // __cpuid intrinsic is not yet implemented
++    return false;
++
+     #[cfg(target_env = "sgx")]
+     {
+         false
+-- 
+2.20.1 (Apple Git-117)