Added gmp

parent b72db24a
# Created by .ignore support plugin (hsz.mobi)
.gitignore
.idea/
gmp-build
tgmp-build
install-sh
......@@ -4162,12 +4162,7 @@ fi
# Check whether --with-sgxsdk was given.
if test "${with_sgxsdk+set}" = set; then :
withval=$with_sgxsdk; SGXSDK=$withval
else
SGXSDK="detect"
fi
if test "x$sgxsim" = "yes"; then :
......@@ -4259,27 +4254,6 @@ else
fi
SGX_DEBUG_FLAGS=$_sgxdebug
if test "x$SGX_SDK" = "x"; then :
SGXSDK=detect
else
SGXSDK=env
fi
if test "x$SGXSDK" = "xenv"; then :
SGXSDK=$SGX_SDK
elif test "x$SGXSDK" != "xdetect"; then :
elif test -d /opt/intel/sgxsdk; then :
SGXSDK=/opt/intel/sgxsdk
elif test -d ~/sgxsdk; then :
SGXSDK=~/sgxsdk
elif test -d ./sgxsdk; then :
SGXSDK=./sgxsdk
else
as_fn_error $? "Can't detect your Intel SGX SDK installation directory" "$LINENO" 5
fi
SGXSDK_INCDIR=$SGXSDK/include
......@@ -4384,25 +4358,10 @@ $as_echo "$as_me: enabling SGX... ${ac_cv_enable_sgx}" >&6;}
ac_cv_sgx_init=yes
gmpdir=
tgmpdir=
# Check whether --with-gmpdir was given.
if test "${with_gmpdir+set}" = set; then :
withval=$with_gmpdir; gmpdir=$withval
fi
# Check whether --with-trusted-gmpdir was given.
if test "${with_trusted_gmpdir+set}" = set; then :
withval=$with_trusted_gmpdir; tgmpdir=$withval
else
tgmpdir=$gmpdir
fi
gmpdir=gmp-build
tgmpdir=tgmp-build
SGXSDK=sgx-sdk-build/sgxsdk
if test "$gmpdir" != ""; then :
......
......@@ -62,23 +62,39 @@ makeExecutable = subprocess.check_output(["which", "make"])
GMP_DIR = "sgx-gmp"
GMP_BUILD_DIR = "gmp-build";
TGMP_BUILD_DIR = "tgmp-build";
SDK_DIR = topDir + "/sgx-sdk-build";
GMP_BUILD_DIR = "gmp-build"
TGMP_BUILD_DIR = "tgmp-build"
SDK_DIR = topDir + "/sgx-sdk-build"
INSTALL_SH = "/usr/share/automake-1.16/install-sh"
if not os.path.isfile(INSTALL_SH):
INSTALL_SH = "/usr/share/automake-1.15/install-sh"
if not os.path.isfile(INSTALL_SH):
raise Exception("Could not find " + INSTALL_SH)
subprocess.call(["rm", "-f", "install-sh"]);
subprocess.call(["rm", "-rf", GMP_BUILD_DIR]);
subprocess.call(["rm", "-rf", TGMP_BUILD_DIR]);
subprocess.call(["rm", "-rf", SDK_DIR]);
subprocess.call(["scripts/sgx_linux_x64_sdk_2.5.100.49891.bin", "--prefix=" + topDir + "/sgx-sdk-build"]);
subprocess.call(["mkdir", "-p", GMP_BUILD_DIR]);
subprocess.call(["mkdir", "-p", TGMP_BUILD_DIR]);
subprocess.call(["mkdir", "-p", SDK_DIR]);
subprocess.call(["ln", "-s", INSTALL_SH, "install-sh"])
subprocess.call(["scripts/sgx_linux_x64_sdk_2.5.100.49891.bin", "--prefix=" + topDir + "/sgx-sdk-build"]);
subprocess.call(["mkdir", "-p", GMP_BUILD_DIR]);
subprocess.call(["mkdir", "-p", TGMP_BUILD_DIR]);
subprocess.call(["rm", "-rf", SDK_DIR]);
os.chdir(GMP_DIR);
subprocess.call(["./configure", "--prefix=" + topDir + "/" + TGMP_BUILD_DIR, "--disable-shared",
......@@ -91,6 +107,8 @@ subprocess.call(["./configure", "--prefix=" + topDir + "/" + GMP_BUILD_DIR, "--d
subprocess.call(["make", "install"]);
subprocess.call(["make", "clean"]);
os.chdir("..")
print("Build successfull.")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment