]> xenbits.xensource.com Git - xen.git/commitdiff
tools/ocaml: Remove '-cc $(CC)' from OCAMLOPTFLAGS
authorAndrii Sultanov <andrii.sultanov@cloud.com>
Thu, 22 Aug 2024 09:06:02 +0000 (10:06 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 23 Aug 2024 09:44:24 +0000 (10:44 +0100)
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 <andrii.sultanov@cloud.com>
Acked-by: Christian Lindig <christian.lindig@cloud.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/ocaml/common.make

index 0c8a597d5b44d5077f0c2d165e312f5755280618..cc126b749f563c1085f7e9d9db75699e8ed6a0d2 100644 (file)
@@ -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