From: Andrii Sultanov Date: Mon, 25 Nov 2024 11:13:02 +0000 (+0100) Subject: tools/ocaml: Remove '-cc $(CC)' from OCAMLOPTFLAGS X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b44b7af7c8aa236a0321151234a618527bfddba1;p=people%2Fandrewcoop%2Fxen.git tools/ocaml: Remove '-cc $(CC)' from OCAMLOPTFLAGS This option does not work as one might expect, and needs to be the full compiler invocation including linking arguments to operate correctly. See https://github.com/ocaml/ocaml/issues/12284 for more details. Signed-off-by: Andrii Sultanov Acked-by: Christian Lindig Acked-by: Andrew Cooper master commit: 0d69635d27cb1d011ccdf419b2bc85cc7809ac92 master date: 2024-08-23 10:44:24 +0100 --- diff --git a/tools/ocaml/common.make b/tools/ocaml/common.make index 0c8a597d5b..cc126b749f 100644 --- a/tools/ocaml/common.make +++ b/tools/ocaml/common.make @@ -12,7 +12,7 @@ OCAMLFIND ?= ocamlfind CFLAGS += -fPIC -I$(shell ocamlc -where) 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 +OCAMLOPTFLAGS = $(OCAMLOPTFLAG_G) -ccopt "$(LDFLAGS)" -dtypes $(OCAMLINCLUDE) -w F -warn-error F OCAMLCFLAGS += -g $(OCAMLINCLUDE) -w F -warn-error F VERSION := 4.1