From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA06818 for caml-redistribution; Tue, 2 Mar 1999 13:33:13 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA07153 for ; Tue, 2 Mar 1999 12:05:44 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id MAA24754; Tue, 2 Mar 1999 12:05:36 +0100 (MET) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA16824; Tue, 2 Mar 1999 12:05:36 +0100 (MET) Message-ID: <19990302120536.08212@pauillac.inria.fr> Date: Tue, 2 Mar 1999 12:05:36 +0100 From: Xavier Leroy To: Dave Mason , caml-list@inria.fr Subject: Re: ocaml cross-compilation and bootable image References: <199902271817.NAA15408@sarg.Ryerson.CA> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1 In-Reply-To: <199902271817.NAA15408@sarg.Ryerson.CA>; from Dave Mason on Sat, Feb 27, 1999 at 01:17:32PM -0500 Sender: weis > I'm running ocamlopt on an Alpha (Linux) but need to generate i386 > binary executables. > Has anyone done this? Any hints on how to do it? I never tried to set up a full cross-compiler, but it should not be hard. You need to run the configure script, then edit the generated file config/Makefile and change the following variables: ARCH= MODEL=default SYSTEM= NATIVECC= NATIVECCCOMPOPTS= NATIVECCLINKOPTS= ASPP= ASPPFLAGS=-c -DSYS_$(SYSTEM) Finally, the name of the assembler called to assemble the output of ocamlopt is (unfortunately) hard-wired in asmcomp//proc.ml, function assemble_file, so you may need to change that file. Or just play with $PATH until "as" refers to your cross-assembler. There's also a hard-wired call to "ar" in utils/ccomp.ml that may need to be changed. Good luck, - Xavier Leroy