[MLton] follow-up [compiling mlton on latest mingw]
Bernard Berthomieu <[email protected]> Tue, 06 Jan 2015 17:33:01 +0100
| Newsgroups | gmane.comp.lang.ml.mlton.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello,
On 12/22/14 17:25, Bernard Berthomieu wrote:
> ... I have now to build the 64 bit version :-( ....
>
No success so far. Could somebody build a 64 bit mlton
compiler for windows, for current mlton ?
My last attempt aimed at building a "hybrid" compiler (rather
than a full cross-compiler), with the compiler running
in 32bit, the runtime libraries compiled in 64bit, and
building 64bit applications only (assuming gcc supports -m64).
For this, I compile the runtime for amd64, copy the results
(build/lib) into a working 32 bit mlton build, and finally create the
constants file.
The idea works on unixes, but when trying it on mingw,
I get link errors when building applications, e.g. :
mlton -verbose 2 -output try try.sml
MLton starting
mlton -verbose 2 -output try try.sml
...
target arch: AMD64
target OS: MinGW
...
Compile and Assemble starting
gcc -std=gnu99 -c \
-Ie:\mlton-src\essai\windows_2014\64\lib\targets\self\include \
-Ie:/mlton-src/essai/windows_2014/64/lib/include -O1
-fno-common \
-fno-strict-aliasing -fomit-frame-pointer -w -m64 -o \
C:\Users\bernard\AppData\Local\Temp\fileZoVMmY.o \
C:\Users\bernard\AppData\Local\Temp\file0roBrd.1.c
gcc -c -m64 -o C:\Users\bernard\AppData\Local\Temp\filexpJB0e.o \
C:\Users\bernard\AppData\Local\Temp\filexhpk6u.0.s
Compile and Assemble finished in 0.00 + 0.00 (0% GC)
Link starting
gcc -o try C:\Users\bernard\AppData\Local\Temp\fileZoVMmY.o \
C:\Users\bernard\AppData\Local\Temp\filexpJB0e.o \
-Le:\mlton-src\essai\windows_2014\64\lib\targets\self -lmlton \
-lgdtoa -lm -lgmp -m64 -lws2_32 -lkernel32 -lpsapi -lnetapi32 \
-lwinmm -Wl,--enable-stdcall-fixup
C:\Users\bernard\AppData\Local\Temp\fileZoVMmY.o:file0roBrd.1.c:(.text+0x556):
undefined reference to `MLton_jumpToSML'
C:\Users\bernard\AppData\Local\Temp\fileZoVMmY.o:file0roBrd.1.c:(.rdata$.refptr.F_0[.refptr.F_0]+0x0):
undefined reference to `F_0'
C:/MinGW/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:
C:\Users\bernard\AppData\Local\Temp\fileZoVMmY.o: bad reloc address 0x0
in section `.rdata$.refptr.F_0[.refptr.F_0]'
collect2.exe: error: ld returned 1 exit status
Link raised in 0.00 + 0.00 (0% GC)
Link raised: Fail
MLton raised in 5.70 + 2.80 (33% GC)
MLton raised: Fail
call to system failed with exit status 1:
gcc -o try C:\Users\bernard\AppData\Local\Temp\fileZoVMmY.o
C:\Users\bernard\AppData\Local\Temp\filexpJB0e.o
-Le:\mlton-src\essai\windows_2014\64\lib\targets\self -lmlton -lgdtoa
-lm -lgmp -m64 -lws2_32 -lkernel32 -lpsapi -lnetapi32 -lwinmm
-Wl,--enable-stdcall-fixup
Any idea where these errors may come from ?
Bernard.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net