caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Aleksey Nogin <nogin@cs.caltech.edu>
To: Xavier Leroy <Xavier.Leroy@inria.fr>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] OCaml 3.08.3 fails to compile under Fedora Core 4 (GCC 4).
Date: Sun, 19 Jun 2005 01:16:13 -0700	[thread overview]
Message-ID: <42B529CD.6070106@cs.caltech.edu> (raw)
In-Reply-To: <20050619074551.GA623@yquem.inria.fr>

On 19.06.2005 00:45, Xavier Leroy wrote:

>>As was already mentioned on this list about a month ago, OCaml 3.08.3 
>>fails to compile with GCC4. [...]
>>As far as I can tell, last time this came up on this list nobody have 
>>offered any solutions short of downgrading GCC. Is there any other way 
>>to get it to work? TIA for any suggestions.
> 
> 
> A simple workaround: after running configure, change config/Makefile
> to set BNG_ASM_LEVEL=0 (instead of 1 or 2).  This will turn off all
> inline asm stuff, at significant cost in speed of bignum operations.
> 
I've realized that in Fedora Extras 4 the ocaml package contains the 
following patch:

--- ocaml-3.08.3/otherlibs/num/bng_ia32.c.x86   2005-05-09 
15:24:29.000000000 -0400
+++ ocaml-3.08.3/otherlibs/num/bng_ia32.c       2005-05-09 
22:02:50.000000000 -0400
@@ -121,7 +121,7 @@
          "leal 4(%1), %1 \n\t"
          "decl %2 \n\t"
          "jnz 1b"
-        : "+&r" (a), "+&r" (b), "+&rm" (blen), "+&r" (out)
+        : "+&r" (a), "+&r" (b), "+m" (blen), "+&r" (out)
          : "rm" (d)
          : "eax", "edx");
    }
@@ -164,7 +164,7 @@
          "leal 4(%1), %1 \n\t"
          "decl %2 \n\t"
          "jnz 1b"
-        : "+&r" (a), "+&r" (b), "+&rm" (blen), "+&rm" (out), "=&r" (tmp)
+        : "+&r" (a), "+&r" (b), "+m" (blen), "+m" (out), "=&r" (tmp)
          : "rm" (d)
          : "eax", "edx");
    }

Is this reasonable? Also, 
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21291 suggests using -O0 
(which seems to work as well).

-- 
Aleksey Nogin

Home Page: http://nogin.org/
E-Mail: nogin@cs.caltech.edu (office), aleksey@nogin.org (personal)
Office: Moore 04, tel: (626) 395-2200


  reply	other threads:[~2005-06-19  8:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-19  3:30 Aleksey Nogin
2005-06-19  7:45 ` [Caml-list] " Xavier Leroy
2005-06-19  8:16   ` Aleksey Nogin [this message]
2005-06-19 10:00     ` Xavier Leroy
2005-06-19 22:27       ` John Skaller

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=42B529CD.6070106@cs.caltech.edu \
    --to=nogin@cs.caltech.edu \
    --cc=Xavier.Leroy@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;
as well as URLs for NNTP newsgroup(s).