From 8dfc1f874de807edc84f09b1350becdfb6475c57 Mon Sep 17 00:00:00 2001 From: Assaf Morami Date: Wed, 6 Jul 2022 14:27:17 +0300 Subject: [PATCH] Support old CPUs in `SGX_MODE=SW` By removing `-C target-feature=+aes,+ssse3` when building --- cosmwasm/enclaves/execute/Makefile | 2 +- cosmwasm/enclaves/query/Makefile | 2 +- cosmwasm/enclaves/shared/contract-engine/Makefile | 2 +- cosmwasm/enclaves/shared/cosmos-types/Makefile | 2 +- cosmwasm/enclaves/shared/cosmwasm-types/Makefile | 2 +- cosmwasm/enclaves/shared/crypto/Makefile | 2 +- cosmwasm/enclaves/shared/utils/Makefile | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cosmwasm/enclaves/execute/Makefile b/cosmwasm/enclaves/execute/Makefile index e05853c1c..90a13df82 100644 --- a/cosmwasm/enclaves/execute/Makefile +++ b/cosmwasm/enclaves/execute/Makefile @@ -96,7 +96,7 @@ Rust_Crate_Source := $(shell find -type f | grep -vP '(\.so|\.o|\.a)$$' | grep - Rust_Target_Path := $(CURDIR)/../xargo ifeq ($(SGX_MODE), SW) - Rust_Flags := "-Z force-unstable-if-unmarked -C target-feature=+aes,+ssse3" + Rust_Flags := "-Z force-unstable-if-unmarked" else Rust_Flags := "-Z force-unstable-if-unmarked -C target-cpu=skylake" endif diff --git a/cosmwasm/enclaves/query/Makefile b/cosmwasm/enclaves/query/Makefile index 0e4d69aee..8bebf8e1f 100644 --- a/cosmwasm/enclaves/query/Makefile +++ b/cosmwasm/enclaves/query/Makefile @@ -96,7 +96,7 @@ Rust_Crate_Source := $(shell find -type f | grep -vP '(\.so|\.o|\.a)$$' | grep - Rust_Target_Path := $(CURDIR)/../xargo ifeq ($(SGX_MODE), SW) - Rust_Flags := "-Z force-unstable-if-unmarked -C target-feature=+aes,+ssse3" + Rust_Flags := "-Z force-unstable-if-unmarked" else Rust_Flags := "-Z force-unstable-if-unmarked -C target-cpu=skylake" endif diff --git a/cosmwasm/enclaves/shared/contract-engine/Makefile b/cosmwasm/enclaves/shared/contract-engine/Makefile index ad94f0548..7718d9794 100644 --- a/cosmwasm/enclaves/shared/contract-engine/Makefile +++ b/cosmwasm/enclaves/shared/contract-engine/Makefile @@ -1,7 +1,7 @@ SGX_MODE ?= HW ifeq ($(SGX_MODE), SW) - Rust_Flags := "-Z force-unstable-if-unmarked -C target-feature=+aes,+ssse3" + Rust_Flags := "-Z force-unstable-if-unmarked" else Rust_Flags := "-Z force-unstable-if-unmarked -C target-cpu=skylake" endif diff --git a/cosmwasm/enclaves/shared/cosmos-types/Makefile b/cosmwasm/enclaves/shared/cosmos-types/Makefile index ad94f0548..7718d9794 100644 --- a/cosmwasm/enclaves/shared/cosmos-types/Makefile +++ b/cosmwasm/enclaves/shared/cosmos-types/Makefile @@ -1,7 +1,7 @@ SGX_MODE ?= HW ifeq ($(SGX_MODE), SW) - Rust_Flags := "-Z force-unstable-if-unmarked -C target-feature=+aes,+ssse3" + Rust_Flags := "-Z force-unstable-if-unmarked" else Rust_Flags := "-Z force-unstable-if-unmarked -C target-cpu=skylake" endif diff --git a/cosmwasm/enclaves/shared/cosmwasm-types/Makefile b/cosmwasm/enclaves/shared/cosmwasm-types/Makefile index ad94f0548..7718d9794 100644 --- a/cosmwasm/enclaves/shared/cosmwasm-types/Makefile +++ b/cosmwasm/enclaves/shared/cosmwasm-types/Makefile @@ -1,7 +1,7 @@ SGX_MODE ?= HW ifeq ($(SGX_MODE), SW) - Rust_Flags := "-Z force-unstable-if-unmarked -C target-feature=+aes,+ssse3" + Rust_Flags := "-Z force-unstable-if-unmarked" else Rust_Flags := "-Z force-unstable-if-unmarked -C target-cpu=skylake" endif diff --git a/cosmwasm/enclaves/shared/crypto/Makefile b/cosmwasm/enclaves/shared/crypto/Makefile index ad94f0548..7718d9794 100644 --- a/cosmwasm/enclaves/shared/crypto/Makefile +++ b/cosmwasm/enclaves/shared/crypto/Makefile @@ -1,7 +1,7 @@ SGX_MODE ?= HW ifeq ($(SGX_MODE), SW) - Rust_Flags := "-Z force-unstable-if-unmarked -C target-feature=+aes,+ssse3" + Rust_Flags := "-Z force-unstable-if-unmarked" else Rust_Flags := "-Z force-unstable-if-unmarked -C target-cpu=skylake" endif diff --git a/cosmwasm/enclaves/shared/utils/Makefile b/cosmwasm/enclaves/shared/utils/Makefile index ad94f0548..7718d9794 100644 --- a/cosmwasm/enclaves/shared/utils/Makefile +++ b/cosmwasm/enclaves/shared/utils/Makefile @@ -1,7 +1,7 @@ SGX_MODE ?= HW ifeq ($(SGX_MODE), SW) - Rust_Flags := "-Z force-unstable-if-unmarked -C target-feature=+aes,+ssse3" + Rust_Flags := "-Z force-unstable-if-unmarked" else Rust_Flags := "-Z force-unstable-if-unmarked -C target-cpu=skylake" endif