[MLton] Building MLton

John Skaller skaller@users.sourceforge.net
Sun, 03 Jul 2005 18:59:58 +1000


--=-8Tf1qzFFSE8MV60OUXaD
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

I have an AMD64 running Ubuntu Hoary and want to=20
run  MLton 64 bit on it (eventually)

Hope this is the right place to report issues.
I'm using gcc-4.0 and CVS version of MLton.

First thing to report is this, which happens so often
it is impossible to report any other problems:

basis/MLton/spawne.c:1: warning: -malign-loops is obsolete, use
-falign-loops

This bug is due to the following incorrect conditional
in the Makefile in runtime:


ifeq ($(GCC_VERSION), 3)
FLAGS +=3D -falign-loops=3D2 -falign-jumps=3D2 -falign-functions=3D5
else
FLAGS +=3D -malign-loops=3D2 -malign-jumps=3D2 -malign-functions=3D5
endif

Of course, I'm using gcc version 4.0 ..=20

I note I have these switches:

-mtune=3Dopteron -m32

which means it should be trying to build a 32 bit version.
The best way to get C code to work 64 bit is to try it :)

cd gdtoa && gcc -std=3Dgnu99 -o arithchk.out arithchk.c
arithchk.c:140: warning: return type defaults to =E2=80=98int=E2=80=99

That's the main. Return type is mandatory. Should read

int main()

Rest of runtime:

gcc -std=3Dgnu99 -O2 -Wall -I. -Iplatform -D_FILE_OFFSET_BITS=3D64
-fomit-frame-pointer -falign-loops=3D2 -falign-jumps=3D2 -falign-functions=
=3D5
-mtune=3Dopteron -m32 -c -o gc.o gc.c
gc.c: In function =E2=80=98createCardMapAndCrossMap=E2=80=99:
gc.c:1272: warning: pointer targets in assignment differ in signedness
gc.c: In function =E2=80=98resizeCardMapAndCrossMap=E2=80=99:
gc.c:2885: warning: pointer targets in assignment differ in signedness
gc.c:2889: warning: pointer targets in passing argument 2 of =E2=80=98copy=
=E2=80=99
differ in signedness
gc.c: In function =E2=80=98initIntInfs=E2=80=99:
gc.c:4133: warning: pointer targets in passing argument 2 of
=E2=80=98__gmpn_set_str=E2=80=99 differ in signedness

Minor quibbles, these need a cast to shut the compiler up.

For bytecode:

gcc -std=3Dgnu99 -fomit-frame-pointer -I../runtime -I../include -Wall
-mtune=3Dopteron -m32  -o print-opcodes -I../runtime -L../runtime        \
        print-opcodes.c -lmlton
/usr/bin/ld: skipping
incompatible /usr/lib/gcc/x86_64-linux/4.0.0/../../../libc.so when
searching for -lc
/usr/bin/ld: skipping
incompatible /usr/lib/gcc/x86_64-linux/4.0.0/../../../libc.a when
searching for -lc
/usr/bin/ld: skipping incompatible /usr/bin/../lib/libc.so when
searching for -lc
/usr/bin/ld: skipping incompatible /usr/bin/../lib/libc.a when searching
for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for
-lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for
-lc
/usr/bin/ld: cannot find -lc

This looks like a bug in my system configuration .. anyone
have any clues?

--=20
John Skaller <skaller at users dot sourceforge dot net>
Download Felix: http://felix.sf.net

--=-8Tf1qzFFSE8MV60OUXaD
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQBCx6kMw7vY25tjqN4RAp1fAJ9pjfznbkPplcRTUOvZfliJ6RCNaQCferjg
fc8A6JSg4BnhraKY07/Hs8c=
=spZY
-----END PGP SIGNATURE-----

--=-8Tf1qzFFSE8MV60OUXaD--