From: David Mentre <David.Mentre@inria.fr>
To: caml-list@inria.fr
Subject: [Caml-list] Trying to build a native cross-compiler for Linux ARM target
Date: 31 Oct 2001 14:36:32 +0100 [thread overview]
Message-ID: <qtl668wrkwv.fsf@pochi.inria.fr> (raw)
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
next reply other threads:[~2001-10-31 13:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-31 13:36 David Mentre [this message]
2001-11-05 8:51 ` 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=qtl668wrkwv.fsf@pochi.inria.fr \
--to=david.mentre@inria.fr \
--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