Skip to content

Instantly share code, notes, and snippets.

@dburihabwa
Created March 26, 2018 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dburihabwa/9c2733767679e8c1a8d5423d1154e38d to your computer and use it in GitHub Desktop.
Save dburihabwa/9c2733767679e8c1a8d5423d1154e38d to your computer and use it in GitHub Desktop.
A (non-secure) patch to make the build of the sgx sdk 2.1.2 pass with ocaml 4.06
From b5e13f533b85cbedafaa30245933cb27880734ba Mon Sep 17 00:00:00 2001
From: Dorian Burihabwa <dorian@burihabwa.com>
Date: Mon, 26 Mar 2018 15:08:21 +0200
Subject: [PATCH] Add permissive ocamlbuild option for compatibility with ocaml
4.06
Added a permissive ocaml build option (-unsafe-string) to make the build
pass with ocaml 4.06 (linux-sgx is supposed to be built against ocaml
4.01).
WARNING: This may lead to a non-secure build of the sdk
---
sdk/edger8r/linux/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sdk/edger8r/linux/Makefile b/sdk/edger8r/linux/Makefile
index 4706cac..74d304c 100644
--- a/sdk/edger8r/linux/Makefile
+++ b/sdk/edger8r/linux/Makefile
@@ -45,7 +45,7 @@ build:
ifeq ($(shell test $(OCAML_VERSION) -lt 402 && echo 1), 1)
ocamlbuild -lflag -ccopt -lflag "-Wl,-z,now" -no-links -libs str,unix Edger8r.native
else
- ocamlbuild -cflags -ccopt,-fpie -lflags -runtime-variant,_pic,-ccopt,-pie,-ccopt -lflag "-Wl,-z,now" -no-links -libs str,unix Edger8r.native
+ ocamlbuild -cflags -ccopt,-fpie,-unsafe-string -lflags -runtime-variant,_pic,-ccopt,-pie,-ccopt -lflag "-Wl,-z,now" -no-links -libs str,unix Edger8r.native
endif
$(BUILD_DIR):
--
2.16.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment