This is the mail archive of the cygwin mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Damien, Thanks for updating OCaml to use FlexDLL. There are some further patches required for a fully-functional OCaml: 1) libcamlrun_shared is not a dynlink module, it is a dynamically-linkable OCaml interpreter (similar to libperl or libpython) to be used by mod_ocaml. Therefore, it must be a DLL installed into /usr/bin with only an import lib in /usr/lib/ocaml. 2) ocamlmktop is a script, not a program, so it must not have an .exe suffix. 3) On Cygwin we use *NIX APIs, not Win32 ones, and ocaml is coded to work with either. Therefore the _WIN32 define must be removed for Cygwin so that the correct APIs are used. As for the packaging, there are several enhancements which I would suggest: 1) install the emacs mode; 2) package camlp4 separately due to its size; 3) install the compiler libs, packaged separately; 4) strip the libcamlrun_shared DLL and /usr/bin/*.opt.exe native executables. A .cygport for 3.12.0 which does all these things is attached. All these files are also available from Ports git: http://cygwin-ports.git.sourceforge.net/git/gitweb.cgi?p=cygwin-ports/ports;a=tree;f=lang/ocaml HTH, Yaakov
--- origsrc/ocaml-3.11.1/byterun/Makefile 2009-05-25 07:25:25.000000000 -0500 +++ src/ocaml-3.11.1/byterun/Makefile 2009-07-21 16:59:57.831069300 -0500 @@ -23,7 +23,7 @@ DOBJS=$(OBJS:.o=.d.o) instrtrace.d.o PICOBJS=$(OBJS:.o=.pic.o) SHARED_LIBS_TMP=$(SUPPORTS_SHARED_LIBRARIES:%false=) -SHARED_LIBS_DEPS=$(SHARED_LIBS_TMP:%true=libcamlrun_shared.so) +SHARED_LIBS_DEPS=$(SHARED_LIBS_TMP:%true=libcamlrun_shared.dll.a) all:: $(SHARED_LIBS_DEPS) @@ -43,15 +43,16 @@ libcamlrund.a: $(DOBJS) ar rc libcamlrund.a $(DOBJS) $(RANLIB) libcamlrund.a -libcamlrun_shared.so: $(PICOBJS) - $(MKDLL) -o libcamlrun_shared.so $(PICOBJS) $(BYTECCLIBS) +libcamlrun_shared.dll.a: $(PICOBJS) + $(MKDLL) -o cygcamlrun_shared.dll -link -Wl,--out-implib,libcamlrun_shared.dll.a $(PICOBJS) $(BYTECCLIBS) install:: - if test -f libcamlrun_shared.so; then \ - cp libcamlrun_shared.so $(LIBDIR)/libcamlrun_shared.so; fi + if test -f libcamlrun_shared.dll.a; then \ + cp cygcamlrun_shared.dll $(BINDIR); \ + cp libcamlrun_shared.dll.a $(LIBDIR)/libcamlrun_shared.dll.a; fi clean:: - rm -f libcamlrun_shared.so + rm -f libcamlrun_shared.dll.a .SUFFIXES: .d.o .pic.o
--- origsrc/ocaml-3.11.2/tools/Makefile.shared 2007-11-22 16:14:43.000000000 -0600 +++ src/ocaml-3.11.2/tools/Makefile.shared 2010-02-14 20:00:07.159668000 -0600 @@ -77,7 +77,7 @@ clean:: rm -f ocamlprof ocamlcp install:: - cp ocamlmktop $(BINDIR)/ocamlmktop$(EXE) + cp ocamlmktop $(BINDIR)/ocamlmktop clean:: rm -f ocamlmktop @@ -121,7 +121,7 @@ clean:: # To make custom toplevels (see Makefile/Makefile.nt) install:: - cp ocamlmktop $(BINDIR)/ocamlmktop$(EXE) + cp ocamlmktop $(BINDIR)/ocamlmktop clean:: rm -f ocamlmktop
--- origsrc/ocaml-3.11.2/configure 2009-11-17 07:28:44.000000000 -0600 +++ src/ocaml-3.11.2/configure 2010-02-14 20:22:59.897184100 -0600 @@ -304,7 +304,7 @@ case "$bytecc,$host" in bytecccompopts="-D_XOPEN_SOURCE=500";; gcc*,*-*-cygwin*) bytecccompopts="-fno-defer-pop $gcc_warnings -U_WIN32" - dllccompopts="-D_WIN32 -DCAML_DLL" + dllccompopts="-DCAML_DLL" if test $withsharedlibs = yes; then flexlink="flexlink -chain cygwin -merge-manifest" flexdir=`$flexlink -where | dos2unix`
Attachment:
ocaml-3.12.0-1.cygport
Description: Text document
-- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |