mirror of
https://github.com/intel/linux-sgx
synced 2026-06-08 14:49:32 +00:00
Updates for SGX 2.17 reproducible build.
Signed-off-by: Zhang Lili <lili.z.zhang@intel.com>
This commit is contained in:
@@ -134,6 +134,11 @@ static sgx_errlist_t sgx_errlist[] = {
|
||||
"Can't open enclave file.",
|
||||
NULL
|
||||
},
|
||||
{
|
||||
SGX_ERROR_MEMORY_MAP_FAILURE,
|
||||
"Failed to reserve memory for the enclave.",
|
||||
NULL
|
||||
},
|
||||
};
|
||||
|
||||
/* Check error conditions for loading enclave */
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
extern "C" void printf(const char *fmt, ...)
|
||||
extern "C" int printf(const char *fmt, ...)
|
||||
{
|
||||
char buf[300] = {'\0'};
|
||||
va_list ap;
|
||||
@@ -47,6 +47,8 @@ extern "C" void printf(const char *fmt, ...)
|
||||
vsnprintf(buf, BUFSIZ, fmt, ap);
|
||||
va_end(ap);
|
||||
ocall_print_string(buf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
#include "dnnl.hpp"
|
||||
|
||||
extern "C" void printf(const char *fmt, ...);
|
||||
extern "C" int printf(const char *fmt, ...);
|
||||
|
||||
// MSVC doesn't support collapse clause in omp parallel
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
#include "dnnl.hpp"
|
||||
|
||||
extern "C" void printf(const char *fmt, ...);
|
||||
extern "C" int printf(const char *fmt, ...);
|
||||
|
||||
// MSVC doesn't support collapse clause in omp parallel
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
#include "dnnl.hpp"
|
||||
|
||||
extern "C" void printf(const char *fmt, ...);
|
||||
extern "C" int printf(const char *fmt, ...);
|
||||
|
||||
static dnnl::engine::kind parse_engine_kind(
|
||||
int argc, char **argv, int extra_args = 0) {
|
||||
|
||||
@@ -131,7 +131,7 @@ ifeq ($(CC_BELOW_4_9), 1)
|
||||
else
|
||||
Enclave_Compile_CFlags := -fstack-protector-strong
|
||||
endif
|
||||
Enclave_Compile_CFlags += -nostdinc -ffreestanding -fvisibility=hidden -fpie -ffunction-sections -fdata-sections $(Enclave_Include_Paths) -fomit-frame-pointer
|
||||
Enclave_Compile_CFlags += -nostdinc -ffreestanding -fvisibility=hidden -fpie -ffunction-sections -fdata-sections $(Enclave_Include_Paths) -fomit-frame-pointer -fno-builtin-printf
|
||||
Enclave_Compile_CXXFlags := -nostdinc++ $(Enclave_Compile_CFlags) -fomit-frame-pointer
|
||||
|
||||
# Enable the security flags
|
||||
|
||||
Reference in New Issue
Block a user