From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA08346; Wed, 31 Oct 2001 14:36:34 +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 OAA08344 for ; Wed, 31 Oct 2001 14:36:33 +0100 (MET) Received: from pochi.inria.fr (pochi.inria.fr [128.93.8.128]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f9VDaW124855 for ; Wed, 31 Oct 2001 14:36:32 +0100 (MET) Received: (from mentre@localhost) by pochi.inria.fr (8.11.1/8.10.0) id f9VDaWN11696; Wed, 31 Oct 2001 14:36:32 +0100 X-Authentication-Warning: pochi.inria.fr: mentre set sender to David.Mentre@inria.fr using -f To: caml-list@inria.fr Subject: [Caml-list] Trying to build a native cross-compiler for Linux ARM target From: David Mentre Date: 31 Oct 2001 14:36:32 +0100 Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, I'm trying to build a native cross-compiler for Linux ARM target. Following a post of Xavier[1], I've made the following steps: 1. do a ./configure -prefix /local/mentre/install/arm-ocaml-3.02 2. modify config/Makefile with: ARCH=arm MODEL=default SYSTEM=linux_elf NATIVECC=/skiff/local/bin/arm-linux-gcc NATIVECCCOMPOPTS=-Wall -Wno-unused NATIVECCLINKOPTS= NATIVECCLIBS= -lm ASFLAGS= ASPP=/skiff/local/bin/arm-linux-gcc ASPPFLAGS=-c -DSYS_$(SYSTEM) 3. modify utils/ccomp.ml with: L63: command(Printf.sprintf "/skiff/local/bin/arm-linux-ar rc %s %s" 4. modify asmcomp/arm/proc.ml with: L193: Sys.command ("/skiff/local/bin/arm-linux-as -o " ^ outfile ^ " " ^ infile) 5. make world && make opt && make install However, when I compile a test program, it fails: pochi(mentre):/tmp [42] cat ./test-arm.ml let rec fib x = if x <= 1 then 1 else fib (x - 1) + fib (x - 2) let _ = print_int (fib 4); print_newline () pochi(mentre):/tmp [32] /local/mentre/install/arm-ocaml-3.02/bin/ocamlopt ./test-arm.ml -o test-arm /local/mentre/install/arm-ocaml-3.02/lib/ocaml/stdlib.a: could not read symbols: Archive has no index; run ranlib to add one collect2: ld returned 1 exit status Error during linking 6. I have noticed that this ranlib is encoded in utils/config.ml so I've modified this file with: let native_partial_linker = "/skiff/local/bin/arm-linux-ld -r " let ranlib = "/skiff/local/bin/arm-linux-ranlib" 7. make world && make opt && make install However, my test program still fails to compile: pochi(mentre):/tmp [37] /local/mentre/install/arm-ocaml-3.02/bin/ocamlopt ./test-arm.ml -o test-arm /local/mentre/install/arm-ocaml-3.02/lib/ocaml/stdlib.a: could not read symbols: Archive has no index; run ranlib to add one collect2: ld returned 1 exit status Error during linking What I have missed ? Best regards, d. [1] http://caml.inria.fr/archives/199903/msg00006.html -- David.Mentre@inria.fr Opinions expressed here are only mine. ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr