From: mharris@cs.cornell.edu (Matthew S. Harris)
To: caml-list@inria.fr
Subject: Building a cross-compiling ocaml
Date: 06 Mar 2000 16:30:35 -0500 [thread overview]
Message-ID: <b366uzhjlw.fsf@tatooine.cs.cornell.edu> (raw)
I am trying to get ocaml to produce code that can be linked against
the libc of a different operating system (the University of Utah's
OSKit project, for those who may know it). The key facts are:
- The target architecture is the same, so all the normal build tools
and commands work; I just need to add some compile-time and
link-time options so gcc will use the proper header files and
libraries.
- I'm using a different libc than the native (Linux) one, so the
ocamlrun produced in this manner cannot be run locally. In other
words, the normal build process gives me a broken ocamlc.
I am not very familiar with the OCaml architecture because I am only
trying to link with some functions written in OCaml. I tried
following the directions given by Xavier a year ago
<http://pauillac.inria.fr/caml/caml-list/1160.html>, which involved
changing NATIVECCCOMPOPTS and NATIVECCLINKOPTS in config/Makefile, but
the make procedure for stdlib/ involves running ocamlrun, which was
linked with the byterun/* files produced with these options.
My understanding is that bytecode files are entirely
system-independent, so I should just need to get the byterun/* files
built with the alternate library. But since ocamlrun, which is used
by ocamlc, is built from these files, I have a circular dependency: I
need to run an ocamlc under Linux to produce the files that I will
link with the alternate libc. What is the best way to resolve this?
Matthew
next reply other threads:[~2000-03-06 21:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-06 21:30 Matthew S. Harris [this message]
2000-03-07 8:24 ` Sven LUTHER
2000-03-08 17:46 ` Benjamin C. Pierce
2000-03-08 17:55 ` Olivier Bouyssou
2000-03-08 18:20 ` Francois Rouaix
2000-03-09 7:02 ` Sven LUTHER
2000-03-07 10:54 ` Xavier Leroy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b366uzhjlw.fsf@tatooine.cs.cornell.edu \
--to=mharris@cs.cornell.edu \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox