2703
|
1 This file is part of MXE. |
|
2 See index.html for further information. |
|
3 |
|
4 Contains ad hoc patches for cross building. |
|
5 |
|
6 From 78c4c5447fb711713ac56774f0751485b25df4bd Mon Sep 17 00:00:00 2001 |
|
7 From: MXE |
|
8 Date: Sat, 23 Jun 2012 22:25:50 +0200 |
|
9 Subject: [PATCH] modifications for cross-compilation |
|
10 |
|
11 part of this patch is taken from |
|
12 http://code.google.com/p/flexdll/issues/detail?id=2 |
|
13 |
|
14 diff --git a/Makefile b/Makefile |
|
15 index 81b2214..7a15574 100644 |
|
16 --- a/Makefile |
|
17 +++ b/Makefile |
|
18 @@ -43,12 +43,12 @@ MSVCC64 = $(MSVCC_ROOT)/amd64/cl.exe /nologo /MD -D_CRT_SECURE_NO_DEPRECATE /GS- |
|
19 CYGCC = gcc |
|
20 OCAMLOPT = ocamlopt |
|
21 #OCAMLOPT = FLEXLINKFLAGS=-real-manifest ocamlopt |
|
22 -#LINKFLAGS = unix.cmxa |
|
23 +LINKFLAGS = unix.cmxa |
|
24 |
|
25 #ifeq ($(SYSTEM), win64) |
|
26 #LINKFLAGS= |
|
27 #else |
|
28 -LINKFLAGS = -ccopt "-link version_res.o" |
|
29 +#LINKFLAGS = -ccopt "-link version_res.o" |
|
30 #endif |
|
31 |
|
32 support: |
|
33 @@ -62,7 +62,7 @@ build_mingw64: flexdll_mingw64.o flexdll_initer_mingw64.o |
|
34 |
|
35 OBJS = version.ml coff.ml cmdline.ml create_dll.ml reloc.ml |
|
36 |
|
37 -flexlink.exe: $(OBJS) version_res.o |
|
38 +flexlink.exe: $(OBJS) |
|
39 @echo Building flexlink.exe with TOOLCHAIN=$(TOOLCHAIN) |
|
40 rm -f flexlink.exe |
|
41 $(OCAMLOPT) -w -105 -o flexlink.exe $(LINKFLAGS) $(OBJS) |
|
42 diff --git a/reloc.ml b/reloc.ml |
|
43 index 1ac7e38..1187f39 100644 |
|
44 --- a/reloc.ml |
|
45 +++ b/reloc.ml |
|
46 @@ -977,7 +977,7 @@ let setup_toolchain () = |
|
47 !dirs @ |
|
48 [ |
|
49 Filename.dirname (get_output1 (!gcc ^ " -print-libgcc-file-name")); |
|
50 - get_output1 (!gcc ^ " -print-sysroot") ^ "/mingw/lib"; |
|
51 + (*get_output1 (!gcc ^ " -print-sysroot") ^ "/mingw/lib";*) |
|
52 ]; |
|
53 default_libs := |
|
54 ["-lmingw32"; "-lgcc"; "-lmoldname"; "-lmingwex"; "-lmsvcrt"; |
|
55 -- |
|
56 1.7.9.5 |
|
57 |