[MLton-devel] Fwd: C back end for MLton
Brad Lucier
lucier@math.purdue.edu
Mon, 4 Nov 2002 14:23:07 -0500 (EST)
Ah, I didn't expect my content-free rants about your C back end to
get to the mail list.
> > BTW, mlton won't build with gcc 3.3 (the development version). There's
> > a problem in basis/Int/quot.c; the warnings are typical of the warnings
> > for other files in this directory.
> >
> > make[2]: Entering directory `/home/lucier/programs/mlton-20020923/runtime'
> > if [ linux = freebsd ] && ! [ -r gmp.h -a -r libgmp.a ]; then \
> > cp /usr/local/lib/mlton/self/libgmp.a
> > /usr/local/lib/mlton/self/include/gmp.h ./; \ fi
> > gcc -Wall -I. -mcpu=pentiumpro -malign-loops=2 -malign-jumps=2
> > -malign-functions=5 -fomit-frame-pointer -O1 -DNODEBUG -c -o
> > basis/Int/quot.o basis/Int/quot.c cc1: warning: -malign-loops is obsolete,
> > use -falign-loops
> > cc1: warning: -malign-jumps is obsolete, use -falign-jumps
> > cc1: warning: -malign-functions is obsolete, use -falign-functions
>
> These switches are in the mlton shell script, and so are easy enough
> to fix yourself. I'm not sure what to with our distribution so it
> works for everyone. I guess we can add some tests for gcc version in
> the shell script.
The -m... switches are machine-specific; now that align operatives are
supported on different architectures, these have been changed to -f...
directives. If the -f... versions work on gcc-2.95 (and later), I suggest
you just change them. I'm not worried about the warnings myself.
> > basis/Int/quot.c: In function `Int_quot':
> > basis/Int/quot.c:10: error: asm-specifier for variable `eax' conflicts with
> > asm clobber list
>
> I tried changing line 6 of quot.c to
>
> register int eax asm("eax");
>
> and recompiled with gcc 2.96 without complaints. Maybe that would be
> enough to make gcc 3.3 happy? Can you try it out and let us know?
I'll try it; did the previous version bomb on 2.96?
At some point (3.* ?) gcc became much more careful about inline asms.
Perhaps you want to build gcc-3.2 (the latest release) and try it.
Brad
-------------------------------------------------------
This SF.net email is sponsored by: ApacheCon, November 18-21 in
Las Vegas (supported by COMDEX), the only Apache event to be
fully supported by the ASF. http://www.apachecon.com
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel