From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 16F2F7EE99 for ; Mon, 23 Dec 2013 16:00:31 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of rich@annexia.org) identity=pra; client-ip=80.68.91.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="rich@annexia.org"; x-sender="rich@annexia.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of rich@annexia.org designates 80.68.91.176 as permitted sender) identity=mailfrom; client-ip=80.68.91.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="rich@annexia.org"; x-sender="rich@annexia.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@furbychan.cocan.org) identity=helo; client-ip=80.68.91.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="rich@annexia.org"; x-sender="postmaster@furbychan.cocan.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiAFALRPuFJQRFuw/2dsb2JhbABZgws4gwK3E4EcFnSCJQEtUiwDAQIKEyEFKBMhiAgBCMp7F4YniBpkHYMNgRMEkDOHY4ExkGSDLTyBLA X-IPAS-Result: AiAFALRPuFJQRFuw/2dsb2JhbABZgws4gwK3E4EcFnSCJQEtUiwDAQIKEyEFKBMhiAgBCMp7F4YniBpkHYMNgRMEkDOHY4ExkGSDLTyBLA X-IronPort-AV: E=Sophos;i="4.95,537,1384297200"; d="scan'208,223";a="42124967" Received: from furbychan.cocan.org ([80.68.91.176]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 23 Dec 2013 16:00:30 +0100 Received: from rich by furbychan.cocan.org with local (Exim 4.80) (envelope-from ) id 1Vv6zb-0004FF-Sj; Mon, 23 Dec 2013 15:00:27 +0000 Date: Mon, 23 Dec 2013 15:00:27 +0000 From: "Richard W.M. Jones" To: caml-list@inria.fr Cc: benedikt.meurer@googlemail.com Message-ID: <20131223150027.GA15442@annexia.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="oyUTqETQ0mS9luUI" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Subject: [Caml-list] Trying out the arm64 compiler --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I'm trying to compile OCaml for arm64/aarch64. I'm currently trying the trunk branch from: https://github.com/ocaml/ocaml which should be identical to SVN. It requires a trivial patch which is attached. I'm using qemu as an arm64 userspace emulator, with Fedora Rawhide: http://rwmj.wordpress.com/2013/12/22/how-to-run-aarch64-binaries-on-an-x86-64-host-using-qemu-userspace-emulation/#content Anyway, it hangs, consistently as soon as it tries to run any ocamlopt-compiled program. During the compile, the first hang is here: ../../ocamlcomp.sh -c -w +33..39 -warn-error A -g -nolabels unix.mli [which runs the just-compiled ocamlc.opt], but even a trivial test program hangs: $ echo 'print_endline "hello, world"' > test.ml $ ./boot/ocamlrun ./ocamlopt -I stdlib stdlib.cmxa test.ml -o test $ ./test [hangs here] Disassembly shows this really is an aarch64 native binary. Unfortunately because of the technique I'm using (qemu-arm64) I cannot use gdb or strace to look at where it is hanging, although I am reasonably sure that it's not hanging *because* of qemu -- at least, I've been able to compile and run masses of software using gcc under the same conditions. Has anyone seen this or have any other ideas? Am I using the right branch for arm64 work? Rich. -- Richard Jones Red Hat --oyUTqETQ0mS9luUI Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-Minor-compile-fix-for-arm64.patch" >From de5c2f3809771981976d4afd50b701b3f005eedc Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 23 Dec 2013 09:51:55 -0500 Subject: [PATCH] Minor compile fix for arm64. --- asmcomp/arm64/emit.mlp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asmcomp/arm64/emit.mlp b/asmcomp/arm64/emit.mlp index bc03c5d..1b298da 100644 --- a/asmcomp/arm64/emit.mlp +++ b/asmcomp/arm64/emit.mlp @@ -604,7 +604,7 @@ let emit_instr i = ` ldr {emit_reg reg_trap_ptr}, [sp], 16\n`; cfi_adjust_cfa_offset (-16); stack_offset := !stack_offset - 16 - | Lraise -> + | Lraise k -> begin match !Clflags.debug, k with | true, (Lambda.Raise_regular | Lambda.Raise_reraise) -> ` bl {emit_symbol "caml_raise_exn"}\n`; -- 1.8.3.1 --oyUTqETQ0mS9luUI--