From 57298e92536d804f73085d70a0590707e8bf4069 Mon Sep 17 00:00:00 2001 From: Eric Chanudet Date: Wed, 28 Mar 2018 18:10:07 -0400 Subject: [PATCH 1/2] Makefile: Remove debug statement. Signed-off-by: Eric Chanudet --- libs/stdext/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/libs/stdext/Makefile b/libs/stdext/Makefile index 1bde792..8c5684c 100644 --- a/libs/stdext/Makefile +++ b/libs/stdext/Makefile @@ -45,7 +45,6 @@ OCAML_LIBRARY = stdext ## OBJS threadext.cmo: threadext.ml - echo $LDFLAGS $(call quiet-command, $(OCAMLC) $(OCAMLCFLAGS) -thread -c -o $@ $<,MLC,$@) threadext.cmi: threadext.mli From a262e25afa777ef0f461ada60fb2bc25ea040b14 Mon Sep 17 00:00:00 2001 From: Eric Chanudet Date: Wed, 28 Mar 2018 18:25:14 -0400 Subject: [PATCH 2/2] Makefile: Enforce PIC. Avoid textrel at all cost. Pass -fPIC if it is not already. Signed-off-by: Eric Chanudet --- common.make | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common.make b/common.make index 5f1f55e..3426760 100644 --- a/common.make +++ b/common.make @@ -11,13 +11,12 @@ CFLAGS ?= -Wall -fPIC -O2 XEN_ROOT ?= $(TOPLEVEL)/../xen-unstable.hg XEN_DIST_ROOT ?= $(XEN_ROOT)/dist/install CFLAGS += -I$(XEN_DIST_ROOT)/usr/include +CFLAGS += -fPIC OCAMLOPTFLAG_G := $(shell $(OCAMLOPT) -h 2>&1 | sed -n 's/^ *\(-g\) .*/\1/p') OCAMLOPTFLAGS = $(OCAMLOPTFLAG_G) -ccopt "$(LDFLAGS)" -dtypes $(OCAMLINCLUDE) -cc "$(CC)" -w F -warn-error F OCAMLCFLAGS += -g $(OCAMLINCLUDE) -w F -warn-error F -#LDFLAGS = -cclib -L./ - DESTDIR ?= / VERSION := echo 0.0