From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA02390 for caml-redistribution@pauillac.inria.fr; Mon, 6 Mar 2000 22:59:02 +0100 (MET) Resent-Message-Id: <200003062159.WAA02390@pauillac.inria.fr> Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA08012 for ; Mon, 6 Mar 2000 22:31:46 +0100 (MET) Received: from simon.cs.cornell.edu (SIMON.CS.CORNELL.EDU [128.84.154.10]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id WAA24682 for ; Mon, 6 Mar 2000 22:31:45 +0100 (MET) Received: from sundial.cs.cornell.edu (SUNDIAL.CS.CORNELL.EDU [128.84.248.71]) by simon.cs.cornell.edu (8.9.3/8.9.3/R-3.0) with ESMTP id QAA20204 for ; Mon, 6 Mar 2000 16:31:43 -0500 (EST) Received: from tatooine.cs.cornell.edu (root@TATOOINE.CS.CORNELL.EDU [128.84.254.43]) by sundial.cs.cornell.edu (8.9.3/8.9.3/M-3.1) with ESMTP id QAA01198 for ; Mon, 6 Mar 2000 16:31:42 -0500 (EST) Received: by cs.cornell.edu via sendmail from stdin id (Debian Smail3.2.0.102) for caml-list@inria.fr; Mon, 6 Mar 2000 16:30:35 -0500 (EST) Sender: mharris@cs.cornell.edu To: caml-list@inria.fr Subject: Building a cross-compiling ocaml From: mharris@cs.cornell.edu (Matthew S. Harris) Organization: Cornell University Computer Science Date: 06 Mar 2000 16:30:35 -0500 Message-ID: User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.5 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-From: weis@pauillac.inria.fr Resent-Date: Mon, 6 Mar 2000 22:59:02 +0100 Resent-To: caml-redistribution@pauillac.inria.fr 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 , 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