Hi,
I just noticed that there is a bug in the support for the native OCaml
tools in one of the makefiles.
The variables which hold the tool command names are defined as
recursively expanded variables but they should be defined as simply
expanded variables ('=' vs ':=' definition). The recursive variable
flavor is not needed here and it produces a recursive definition error if
NATIVECAML is defined for compilation. This is due to the recursive
redefinition of CAMLDEP in this case.
I attached a patch which replaces the variable definition type.
Cheers
Oliver
14.07.2012 08:41, Gabriel Kerneis:
On Fri, Jul 13, 2012 at 01:49:39PM +0200, Oliver Schwahn wrote:
I just realized that the CIL build chain does not support the native
versions of the OCaml tools. The native tool versions often
outperform the byte code versions, e.g. ocamlc.opt (the native
version) can compile CIL much faster than ocamlc (the byte code
version) can.
Right, I used to have a local patch for this, but I never committed it. Your
patch is cleaner anyway, with proper configure checks.
I attached a patch for my modifications. Feel free to use it if it's
of any use for you.
Applied, many thanks.
diff --git a/ocamlutil/Makefile.ocaml b/ocamlutil/Makefile.ocaml
index c88ddaf..43b1fde 100644
--- a/ocamlutil/Makefile.ocaml
+++ b/ocamlutil/Makefile.ocaml
@@ -169,15 +169,15 @@
#
ifdef CAMLNATTL
- CAMLLEX = ocamllex.opt
- CAMLDEP = ocamldep.opt
- CAMLCMPLR = ocamlc.opt
- CAMLCMPLR_OPT = ocamlopt.opt
+ CAMLLEX := ocamllex.opt
+ CAMLDEP := ocamldep.opt
+ CAMLCMPLR := ocamlc.opt
+ CAMLCMPLR_OPT := ocamlopt.opt
else
- CAMLLEX = ocamllex
- CAMLDEP = ocamldep
- CAMLCMPLR = ocamlc
- CAMLCMPLR_OPT = ocamlopt
+ CAMLLEX := ocamllex
+ CAMLDEP := ocamldep
+ CAMLCMPLR := ocamlc
+ CAMLCMPLR_OPT := ocamlopt
endif
CAMLYACC = ocamlyacc -v
@@ -273,7 +273,7 @@ ifdef NATIVECAML
# sm: by adding -native in native mode, we prevent spurious
# dependencies on .cmo files which were causing lots of
# extra recompilation
- CAMLDEP = $(CAMLDIR)$(CAMLDEP) -native
+ CAMLDEP := $(CAMLDIR)$(CAMLDEP) -native
# CAML_NOOPT maintains its value on entry (default, missing)
else
# Bytecode mode
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users