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 SAA00258; Sat, 6 Mar 2004 18:37:47 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 SAA00604 for ; Sat, 6 Mar 2004 18:37:45 +0100 (MET) Received: from quick.recoil.org (quick.recoil.org [194.70.3.133]) by concorde.inria.fr (8.12.10/8.12.10) with SMTP id i26HbjUM020698 for ; Sat, 6 Mar 2004 18:37:45 +0100 Received: (qmail 26503 invoked by uid 10000); 6 Mar 2004 17:37:44 -0000 Date: Sat, 6 Mar 2004 17:37:44 +0000 From: Anil Madhavapeddy To: caml-list@inria.fr Subject: [Caml-list] ocaml/amd64 native compiler on openbsd Message-ID: <20040306173744.GA31003@quick.recoil.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; openbsd:01 openbsd:01 binutils:01 ocamlopt:01 2004:99 netbsd:01 sunos:01 model:01 -linux:01 model:01 -linux:01 esac:01 386,:01 386,:01 nativecc:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 67 I've committed support into OpenBSD ports for the ocaml/amd64 native compiler. It will be available in OpenBSD 3.5. The configure patch at the end of the msg is required to detect the OpenBSD architectures. Also, OpenBSD uses BSD nm, and not the binutils one, but it appears to work fine with ocamlopt, so the test for that is modified as well. The only other issue is that the version of gas used in OpenBSD doesnt support the mergeable section flag, so I just removed it from the assembly output, without any ill-effects as far as I can tell. .section .rodata.cst8,"aM",@progbits,8 becomes .section .rodata.cst8,"a",@progbits The exceptions fix from ocaml-current was also needed. --- configure.orig 2003-09-25 09:17:13.000000000 +0100 +++ configure 2004-03-05 15:44:08.000000000 +0000 @@ -537,6 +537,7 @@ case "$host" in alpha*-*-freebsd*) arch=alpha; system=freebsd;; alpha*-*-netbsd*) arch=alpha; system=netbsd;; alpha*-*-openbsd*) arch=alpha; system=openbsd;; + amd64-*-openbsd*) arch=amd64; system=openbsd;; sparc*-*-sunos4.*) arch=sparc; system=sunos;; sparc*-*-solaris2.*) arch=sparc; system=solaris;; sparc*-*-*bsd*) arch=sparc; system=bsd;; @@ -555,6 +556,7 @@ case "$host" in powerpc-*-aix*) arch=power; model=ppc; system=aix;; powerpc-*-linux*) arch=power; model=ppc; system=elf;; powerpc-*-netbsd*) arch=power; model=ppc; system=bsd;; + macppc-*-openbsd*) arch=power; model=ppc; system=bsd;; powerpc-*-rhapsody*) arch=power; model=ppc; system=rhapsody;; powerpc-*-darwin*) arch=power; model=ppc; system=rhapsody;; arm*-*-linux*) arch=arm; system=linux;; @@ -629,8 +631,11 @@ esac cc_profile='-pg' case "$arch,$model,$system" in alpha,*,digital) profiling='prof';; + alpha,*,openbsd) profiling='prof';; i386,*,linux_elf) profiling='prof';; i386,*,bsd_elf) profiling='prof';; + amd64,*,openbsd) profiling='prof';; + sparc,*,bsd) profiling='prof';; sparc,*,solaris) profiling='prof' case "$nativecc" in gcc*) ;; *) cc_profile='-xpg';; esac;; @@ -654,8 +659,8 @@ if test "$arch" != "none"; then echo "$d/objcopy does not support option --redefine-sym, discarded" continue; fi - if test `$d/nm --version | grep -s -c 'GNU nm'` -eq 0; then - echo "$d/nm is not from GNU binutils, discarded" + if test `$d/nm --version 2>&1|grep -E -s -c 'GNU nm|OpenBSD'` -eq 0; then + echo "$d/nm is not from GNU binutils or OpenBSD, discarded" continue; fi binutils_objcopy="$d/objcopy" -- Anil Madhavapeddy http://anil.recoil.org University of Cambridge http://www.cl.cam.ac.uk ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners